History log of /frameworks/base/libs/hwui/Matrix.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a447d29c65fb811cd184775a3476101a1cede929 12-Jun-2014 John Reck <jreck@google.com> Fix DA bugs

* Now aware of transform of DrawDisplayListOp
* Supports projection

Bug: 15539677
Bug: 15506680

Change-Id: Ic16f482cd48c3add12e49eca529281be12b93491
/frameworks/base/libs/hwui/Matrix.h
e4aa95e3627226bcb0d8cc3e42dca6e4df8f421c 08-May-2014 Chris Craik <ccraik@google.com> Add logging utility methods

Change-Id: I0f316830dcc0bbf438292a6d0fbe9f8154368500
/frameworks/base/libs/hwui/Matrix.h
b79a3e301a8d89b9e1b1f6f3d7fd6aa56610a6f0 11-Mar-2014 Chris Craik <ccraik@google.com> Fix orthographic shadows projection, simplify shadow reordering

Separate matrix passed to shadow system into two parts, one for
transforming the polygon XY points (using the actual draw matrix) and
a separate one which respects correct 4x4 3d rotations and
translations for determining Z values.

Change-Id: I7e30a84774a8709df6b2241e8f51fc5583648fe8
/frameworks/base/libs/hwui/Matrix.h
e361ad7ab15fcf4919a56a6293689d968ee8dcff 11-Mar-2014 Chris Craik <ccraik@google.com> Remove experimental perspective projection

Change-Id: Iad688c8395ccd4673cc129973802b5f01dfb45ba
/frameworks/base/libs/hwui/Matrix.h
629f67709b84a6bebdecdc8a500bf83560f557d0 05-Feb-2014 Chris Craik <ccraik@google.com> Simplify DisplayList matrices

Somewhat unifies the ortho/perspecive paths - the property matrix
(translate/scale/rotate) is now always a Matrix4.

Change-Id: I36e4fe83d1150ee6e4be5f64f34d0fc8d6525cc6
/frameworks/base/libs/hwui/Matrix.h
f57776b2d195f0937906eb88b777bb55ccc36967 26-Oct-2013 Chris Craik <ccraik@google.com> 3d view system!

True 3d transformations are now supported by DisplayLists and the
renderer, initially with the translationZ property on view.

Renderer operations used directly by DisplayList (formerly,
clip/save/restore/saveLayer) are now more simply managed by allocating
them temporarily on the handler's allocator, which exists for a single
frame. This is much simpler than continuing to expand the pool of
pre-allocated DisplayListOps now that more operations are called
directly by DisplayList, especially with z ordered drawing.

Still TODO:
-APIs for camera positioning, shadows
-Make Z apis public, and expose through XML
-Make invalidation / input 3d aware

Change-Id: I95fe6fa03f9b6ddd34a7e0c6ec8dd9fe47c6c6eb
/frameworks/base/libs/hwui/Matrix.h
996fe656340ede058a6f0e6b18f9ec525ddb4e27 21-Sep-2013 Chris Craik <ccraik@google.com> Correct bitmap merging logic

bug:10863163

This fixes two issues

The check for pure translation was incorrect. It was fixed and renamed
for clarity.

Certain matrix paths weren't setting kTypePositiveScale. For
simplicity (and because positive scale is simple to check) removed
flag in favor of dynamic checking.

Change-Id: Ic5ce235653ef49a68b8b242bd89fc2e95874ecc9
/frameworks/base/libs/hwui/Matrix.h
d965bc5823d878a3fd056b8a95fb4eb578ed3fe4 16-Sep-2013 Chris Craik <ccraik@google.com> Disallow negative scale matrices in merged Bitmap drawing

bug:10622962

Change-Id: I55ac18ad56b53dc9e6e6ea14cd3ec4bdafa98ac3
/frameworks/base/libs/hwui/Matrix.h
f6bed4f12a2c975678fc0bdea15054ab169aafb5 21-Jun-2013 Romain Guy <romainguy@google.com> An identity matrix should be considered a pure translate matrix

Change-Id: I75e91797e8270f902f67bdd7bb526cccc23adc6b
/frameworks/base/libs/hwui/Matrix.h
28ce94a4ffc7576f40776d212f1ada79fafaa061 31-May-2013 Chris Craik <ccraik@google.com> Overdraw avoidance and merging of clipped ops

bug:8951267

If an opaque op, or group of opaque ops covers the invalidate region,
skip draw operations that precede it.

Clipped operations may now be merged, but only if they share a
clipRect - this is a very case for e.g. ListView, where all background
elements may now be a part of the same MergingDrawBatch.

It is this more aggressive merging that groups together clipped
background elements in the ListView case, enabling the overdraw
avoidance skipping the window background.

Change-Id: Ib0961977e272c5ac37f59e4c67d828467422d259
/frameworks/base/libs/hwui/Matrix.h
4c2547fa9244e78115cde0a259291053108c3dc7 12-Jun-2013 Romain Guy <romainguy@google.com> Avoid 9patch cache lookups when possible

This optimization saves up to 0.3ms per frame on the Play Store's
front page, on a Nexus 4 device.

Change-Id: Iaa4ef33c6e3b37e175efd5b9eea9ef59b43f14f3
/frameworks/base/libs/hwui/Matrix.h
bd3055f95e67a55648fd84a125e939293115171b 14-Mar-2013 Romain Guy <romainguy@google.com> Less aggressive glyphs precaching

The renderer used to pre-cache glyphs at record time. This then changed
to pre-caching at the beginning of every frame. This unfortunately entails
a lot of duplicate work on every frame, which amounts to 0.5 to 1ms in
some stock applications.

This change is somewhere in the middle: pre-caching happens the first
time a DrawTextOp is deferred or every time the screen-space transform
is different from the last pre-caching operation.

Change-Id: Id6d9e2599d90a5b75010b0f0a28746befbf3c205
/frameworks/base/libs/hwui/Matrix.h
624234f69b2a4781d24f3e4c6ae6450729e38397 06-Mar-2013 Romain Guy <romainguy@google.com> Take only the scale params into account to rasterize text

This change extracts the scale parameters of the current transform
to pass then to the font renderer. Rotation and perspective are
applied to the generated mesh inside the vertex shader. This limits
the number of glyphs we have to create in the font cache and thus
reduces memory churn.

Change-Id: Ic5b3bae2b2b0e0250a8ee723b071a1709725c749
/frameworks/base/libs/hwui/Matrix.h
3b753829ae858d424fe109f714745379a6daf455 05-Mar-2013 Romain Guy <romainguy@google.com> Fix colored rects clipping and code cleanup

The drawColorRects() method was clipping individual rectangles
using the wrong parameters left, top, right and bottom instead
of l, r, t and b. It also checked for count == 0 after the loop
when it should have checked for vertexCount == 0. The quickReject
is now not part of the loop since it's a bit overkill to perform
so many matrix multiplications. What we really care about is the
final quickReject performed on the max bounds of the entire set
of rectangles.

This change also replaces all instances of mSnapshot->transform
by currentTransform() to make the code slightly more readable.

Change-Id: I6485280414499716852f7dbfba186774eb6763d4
/frameworks/base/libs/hwui/Matrix.h
c74f45a334f0e3725c23cdd270cbcb0efac4ea75 27-Feb-2013 Romain Guy <romainguy@google.com> Properly scale text

This change does not apply to drawPosText() and drawTextOnPath() yet.

Prior to this change, glyphs were always rasterized based on the
font size specified in the paint. All transforms were then applied
on the resulting texture. This creates rather ugly results when
text is scaled and/or rotated.

With this change, the font renderer will apply the current transform
matrix to the glyph before they are rasterized. This generates much
better looking results.

Change-Id: I0141b6ff18db35e1213e7a3ab9db1ecaf03d7a9c
/frameworks/base/libs/hwui/Matrix.h
8ce00301a023eecaeb8891ce906f67b513ebb42a 16-Jan-2013 Romain Guy <romainguy@google.com> Implement clipRect with a transform, clipRegion & clipPath
Bug #7146141

When non-rectangular clipping occurs in a layer the render buffer
used as the stencil buffer is not cached. If this happens on a
View's hardware layer the render buffer will live for as long
as the layer is bound to the view. When a stencil buffer is
required because of a call to Canvas.saveLayer() it will be allocated
on every frame. A future change will address this problem.

If "show GPU overdraw" is enabled, non-rectangular clips are not
supported anymore and we fall back to rectangular clips instead.
This is a limitation imposed by OpenGL ES that cannot be worked
around at this time.

This change also improves the Matrix4 implementation to easily
detect when a rect remains a rect after transform.

Change-Id: I0e69fb901792d38bc0c4ca1bf9fdb02d7db415b9
/frameworks/base/libs/hwui/Matrix.h
a3dc55f83ab583e0a66b893c71b849afa046770a 28-Sep-2012 Romain Guy <romainguy@google.com> Fix a couple of rendering issues
Bug #7253839

1. Make sure we don't make GL calls while recording display lists

2. Disable an early and trivial clip optimization in font renderer
when a perspective transformation is used on the Canvas

Change-Id: I3f1052164239329346854f72d0a0d401fbfecf06
/frameworks/base/libs/hwui/Matrix.h
710f46d9d6a5bf9ea1c1833384caf61e1934124f 18-Sep-2012 Chris Craik <ccraik@google.com> Polygonal rendering of simple fill shapes

bug:4419017

Change-Id: If0428e1732139786cba15f54b285d880e4a56b89
/frameworks/base/libs/hwui/Matrix.h
71e36aa7db69449e210d0791284cb810a7471c07 12-Oct-2011 Romain Guy <romainguy@google.com> Add missing public native API

Change-Id: Ie3bc706b2ac91d686a5b888e8ae841820e9d37c7
/frameworks/base/libs/hwui/Matrix.h
302a9df1d50373c82923bb84ff665dfce584fb22 16-Aug-2011 Romain Guy <romainguy@google.com> Add an API to set the transform on a TextureView's surface texture.
Bug #5156689

Change-Id: I635a625885c9b832a60d44ece0de7613ceb84109
/frameworks/base/libs/hwui/Matrix.h
181d0a6ccedee03789919d53c46540a8df751896 10-Jun-2011 Romain Guy <romainguy@google.com> Don't apply AA to rects with no rotation/perspective.

Change-Id: I21138d4d0589cc28f1dcffb8b675cd81a9900e24
/frameworks/base/libs/hwui/Matrix.h
807daf7df615b60ce6fc41355aabe3aa353cebab 18-Jan-2011 Romain Guy <romainguy@google.com> Add support for skew()

Change-Id: Ia3a9a867f74fd78b61f75179e3788fdc2f0cacd0
/frameworks/base/libs/hwui/Matrix.h
6620c6d413f972819fada92b574f0fa9e96d36c1 07-Dec-2010 Romain Guy <romainguy@google.com> Correctly render text when coordinates are not integers.
Bug #3225632

Change-Id: If09759e6e95eb2885362ab3ba088cf5aae64c7bf
/frameworks/base/libs/hwui/Matrix.h
5b3b35296e8b2c8d3f07d32bb645d5414db41a1d 28-Oct-2010 Romain Guy <romainguy@google.com> Optimize FBO drawing with regions.
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
/frameworks/base/libs/hwui/Matrix.h
e8cb9c14309b0f01c0159efdf9a7198f44a62642 04-Oct-2010 Romain Guy <romainguy@google.com> Apply bilinear filtering on text only when necessary.

Change-Id: Ic903f4b5d30e9c92528c6291941896efe4729ee3
/frameworks/base/libs/hwui/Matrix.h
ddb80bebb0776e6d852aab6e8bba5d5591847a55 21-Sep-2010 Romain Guy <romainguy@google.com> Add support for circular gradients to the GL renderer.

This change also adds full support for local transformation matrices on
sweep and radial gradients.

Change-Id: Id8773bc0766575190e3f3d51984fc5e57b266c3f
/frameworks/base/libs/hwui/Matrix.h
0ba681bce12d522c5575dfccb5a6ca12f0fba746 13-Aug-2010 Romain Guy <romainguy@google.com> Fix GC issue, fix local shader transformations.

Change-Id: I208bdf89815dcd18dcadd43df932a77362918435
/frameworks/base/libs/hwui/Matrix.h
af28b514964861d81b48902f942f706050936d38 12-Aug-2010 Romain Guy <romainguy@google.com> Better support for rotation and perspective matrices.

Change-Id: I56b5ae3321735ba5ee42aafc9bc0eb399b9e75b5
/frameworks/base/libs/hwui/Matrix.h
079ba2c85b15e882629b8d188f5fbdb42f7f8eea 16-Jul-2010 Romain Guy <romainguy@android.com> Improve clip support (add intersect, union and replace.)

This change also modifies the way the clip is stored. The clip is now
always stored in screen-space coordinates.

Change-Id: I96375784d82dfe975bc6477a159e6866e7052487
/frameworks/base/libs/hwui/Matrix.h
3d58c03de0d8877b36cdb78b0ca8b5cac7f600e2 15-Jul-2010 Romain Guy <romainguy@google.com> Do not apply transforms when using drawColor().

This fixes an issue in the way the clip transformations were applied.

Change-Id: I91e7b5d15baf244d1280e48938282bb33609081d
/frameworks/base/libs/hwui/Matrix.h
bd6b79b40247aea7bfe13d0831c6c0472df6c636 26-Jun-2010 Romain Guy <romainguy@android.com> Add implementations for saveLayerAlpha() and textured rects.

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
/frameworks/base/libs/hwui/Matrix.h
7ae7ac48aa2b53453c9805075171ecd5bcafd7de 25-Jun-2010 Romain Guy <romainguy@android.com> Convert tabs to spaces.

Change-Id: I5d3ae48af79b19b6d293deff0521e4bb57d5114b
/frameworks/base/libs/hwui/Matrix.h
c7d53494f1fbd9f9d74af89053ff9fdb1ccbac6c 25-Jun-2010 Romain Guy <romainguy@android.com> Implement quickReject() and drawRect().

The OpenGL ES 2.0 renderer can now draw colored rectangles. At least there's
something on screen now.

Change-Id: I80a13ccc1dd56784edf74f2670a364f30700234a
/frameworks/base/libs/hwui/Matrix.h
9d5316e3f56d138504565ff311145ac01621dff4 25-Jun-2010 Romain Guy <romainguy@google.com> Add colored rectangles implementation in OpenGLRenderer.

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
/frameworks/base/libs/hwui/Matrix.h
f6a11b8a9e25ff9861bbba19251bea84d8a5daf2 24-Jun-2010 Romain Guy <romainguy@google.com> Add support for transformations.

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
/frameworks/base/libs/hwui/Matrix.h
85bf02fc16784d935fb9eebfa9cb20fe46ff7951 22-Jun-2010 Romain Guy <romainguy@google.com> Fix the simulator build.

Change-Id: Ie404f7c2c308f0657f273af19a56e8c039b61898
/frameworks/base/libs/hwui/Matrix.h