summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Matrix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix issue where scale-animating text would jump temporarily a few pixelsChet Haase2012-05-071-7/+4
| | | | | | | | | | | | | | | | | | | | | | Some logic in the native matrix code would determine that a matrix was 'pureTranslate' based on the scale values of a matrix being close-enough to 1, which was within a very small epsilon. This works in general, because screen space coordinates make that epsilon value irrelevant, so close-enough really is close-enough. However, TextView, when centering text, works in a coordinate system that is quite huge, with left/right values about 500,000. These numbers multiplied times that small epsilon value would give a result that was significant, and would cause a miscalculation of up to 4-5 pixels, causing the snap that we'd see for a couple of frames as the scale got "close enough" to 1. The fix is to remove the optimization of "close enough". What we really need the matrix to do is to identify itself as being translate-only when no scale as been set (which is the default). For the purposes of that check, it is good enough to simply check the values against 1 directly. Similarly, the bounds-check logic needs to check against 0 and 1 directly. Issue #6452687: Glitch when changing scale of a view containing text Change-Id: I167fb45d02201fb879deea0e5a7ca95e38128e17
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-6/+6
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* Add an API to set the transform on a TextureView's surface texture.Romain Guy2011-08-161-0/+23
| | | | | | Bug #5156689 Change-Id: I635a625885c9b832a60d44ece0de7613ceb84109
* Don't apply AA to rects with no rotation/perspective.Romain Guy2011-06-091-0/+4
| | | | Change-Id: I21138d4d0589cc28f1dcffb8b675cd81a9900e24
* Add support for skew()Romain Guy2011-01-181-0/+18
| | | | Change-Id: Ia3a9a867f74fd78b61f75179e3788fdc2f0cacd0
* Correctly render text when coordinates are not integers.Romain Guy2010-12-061-0/+5
| | | | | | Bug #3225632 Change-Id: If09759e6e95eb2885362ab3ba088cf5aae64c7bf
* Optimize FBO drawing with regions.Romain Guy2010-11-021-0/+13
| | | | | | | | | This optimization is currently disabled until Launcher is modified to take advantage of it. The optimization can be enabled by turning on RENDER_LAYERS_AS_REGIONS in the OpenGLRenderer.h file. Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
* Use VBOs to render most geometries.Romain Guy2010-10-181-3/+5
| | | | Change-Id: I4360dc4fe5693ab425450c107282b2c22db4dca7
* Fix clipping issue in StackView.Romain Guy2010-10-151-1/+1
| | | | Change-Id: I7ec28f25c3993a2bd7ef6399ba1923839d239905
* Optimize 9patch rendering.Romain Guy2010-10-121-3/+1
| | | | | | | This change detects empty quads in 9patches and removes them from the mesh to avoid unnecessary blending. Change-Id: I4500566fb4cb6845d64dcb59b522c0be7a0ec704
* Apply bilinear filtering on text only when necessary.Romain Guy2010-10-041-0/+9
| | | | Change-Id: Ic903f4b5d30e9c92528c6291941896efe4729ee3
* Add support for circular gradients to the GL renderer.Romain Guy2010-09-211-0/+6
| | | | | | | This change also adds full support for local transformation matrices on sweep and radial gradients. Change-Id: Id8773bc0766575190e3f3d51984fc5e57b266c3f
* Correctly set the viewport in layers.Romain Guy2010-08-171-6/+6
| | | | | | Bug #2919295 Change-Id: I16ce79ab0d5747cb01c6c1abe531da3dfd93fb54
* Fix GC issue, fix local shader transformations.Romain Guy2010-08-121-2/+19
| | | | Change-Id: I208bdf89815dcd18dcadd43df932a77362918435
* Better support for rotation and perspective matrices.Romain Guy2010-08-121-98/+153
| | | | Change-Id: I56b5ae3321735ba5ee42aafc9bc0eb399b9e75b5
* Moved all the rendering code to the new shader generator.Romain Guy2010-07-291-0/+5
| | | | | | | | | | | The generator supports features that are not yet implement in the renderer: color matrix, lighting, porterduff color blending and composite shaders. This change also adds support for repeated/mirrored non-power of 2 bitmap shaders. Change-Id: I903a11a070c0eb9cc8850a60ef305751e5b47234
* Improve clip support (add intersect, union and replace.)Romain Guy2010-07-161-0/+19
| | | | | | | This change also modifies the way the clip is stored. The clip is now always stored in screen-space coordinates. Change-Id: I96375784d82dfe975bc6477a159e6866e7052487
* Reduced the complexity of layers composition.Romain Guy2010-06-271-1/+1
| | | | | | | | | | | This change also refactors the code base a bit by moving classes out of OpenGLRenderer into separate headers/implementations. This makes the code more manageable. This change also adds documentation for implementation methods. The undocumented methods are simply Skia's Canvas methods. Change-Id: I54c68b443580a0129251dddc1a7ac95813d5289e
* Add implementations for saveLayerAlpha() and textured rects.Romain Guy2010-06-261-0/+8
| | | | | | | | | | | Even though there's an implementation for textured rects, drawBitmap() is not hooked up yet as it will require a good texture cache. This method is implemented using FBOs. There's currently an issue either in the driver or in the Canvas renderer that forces the FBO to be fullscreen, which is extremely expensive and yields terrible performance. Change-Id: I148419195e12d45653c60186938aa78c23a68e2c
* Convert tabs to spaces.Romain Guy2010-06-251-95/+95
| | | | Change-Id: I5d3ae48af79b19b6d293deff0521e4bb57d5114b
* Implement quickReject() and drawRect().Romain Guy2010-06-251-79/+79
| | | | | | | The OpenGL ES 2.0 renderer can now draw colored rectangles. At least there's something on screen now. Change-Id: I80a13ccc1dd56784edf74f2670a364f30700234a
* Add colored rectangles implementation in OpenGLRenderer.Romain Guy2010-06-241-2/+19
| | | | | | | Drawing two rectangles one after the other discards the second one because of Z buffering issues. This will be fixed in another changelist. Change-Id: Ida1b3cde8a78e60cacc07e477abc44def527ff67
* Add support for transformations.Romain Guy2010-06-231-29/+65
| | | | | | | | | | | | | | | This change adds partial support for the following transforms: - scale() - translate() - rotate() - setMatrix() - getMatrix() The transform is stored in a snapshot and saved/restored as needed. The transform is currently not applied to the clip rect and is not mapped to the vertex shader. Change-Id: Id48993453311200804149917d0c126a4d0471226
* Add implementations for clipRect(), save() and restore().Romain Guy2010-06-231-4/+6
| | | | | | | The current implementation of clipRect() does not apply local transformations before setting the new clip. Change-Id: I5997871bb638dfcd1a8ef96354846af52427e445
* Fix simulator build again.Romain Guy2010-06-221-0/+1
| | | | Change-Id: Ifd204d64eaa4c356422e3363ec0a6e6aa61c52dc
* Fix the simulator build.Romain Guy2010-06-221-0/+148
Change-Id: Ie404f7c2c308f0657f273af19a56e8c039b61898