History log of /frameworks/base/libs/hwui/DisplayList.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a35778c799e8073a42b9e22191bde9d838327ab7 06-Nov-2014 John Reck <jreck@google.com> Yank ResourceCache out of Caches

Bug: 17947547

Pull the ResourceCache (aka, ref-counting side channel) out of
Caches so that DisplayListRenderer doesn't use Caches, avoiding
the risk of instantiating Caches on the wrong thread or
without a GL context

Change-Id: I7d63b70b3b0a0163308c5dedd6ef255eadebe8fd
/frameworks/base/libs/hwui/DisplayList.cpp
0e89e2b7bcb2c035e8cee77f93120e7c5617f8d2 31-Oct-2014 John Reck <jreck@google.com> Layer changes

Bug: 17208461

* Switch Layer to be VirtualLightRefBase instead of
Caches' side-channel ref-counting
* Include active layers in gfxinfo dump
* Run gfxinfo dump on the correct thread
* Dump gfxinfo on Layer creation failure

Change-Id: I28d195699e2334518e215ab28c7a17355aee9678
/frameworks/base/libs/hwui/DisplayList.cpp
8afd0f245cc0c4a0366f39f41b5f78e47ee83be3 22-Aug-2014 Chris Craik <ccraik@google.com> Create z reordering boundaries around dispatchDraw

bug:16012254

This means rendernodes with a Z will no longer be drawn at the end of
their parent's DisplayList, but at the end of the associated reorder
region (DisplayListData::Chunk).

Change-Id: Ia033fee9d9a4db567b2a8d5e90fc57a4d0a64544
/frameworks/base/libs/hwui/DisplayList.cpp
09d5cddf67b676018700bcc10a72242641cd7eec 24-Jul-2014 John Reck <jreck@google.com> Add kModeSync

Bug: 16526750

Change-Id: I4c087160e80432739321172fd57880846c8de6e0
/frameworks/base/libs/hwui/DisplayList.cpp
a7090e0cfd7c719a6d4c03aae34f5db98754cbdd 21-Jun-2014 Chris Craik <ccraik@google.com> Update 'DisplayList' vs 'RenderNode' naming in several places

Change-Id: I635c6627d098b661fb9b0ba1bd42fa6d7277d287
/frameworks/base/libs/hwui/DisplayList.cpp
139088228faa7f3c446af7387e017933998a5570 10-Dec-2013 Derek Sollenberger <djsollen@google.com> Update HWUI matrix API

1. more closely mirror Skia API by using const ref instead of ptrs
2. store SkMatrix in the drawOp instead of the linear allocation heap

Change-Id: I4b9f6f76b9f7d19325e29303d27b793679fd4823
/frameworks/base/libs/hwui/DisplayList.cpp
d1ad5e62fda248c6d185cde3cb6d9f01a223066c 05-May-2014 Leon Scroggins III <scroggo@google.com> Inspect SkShader to determine hw shader.

Instead of duplicating internal info about SkShader, inspect the
SkShader installed on the SkPaint.

core/java/android/view/GLES20Canvas.java:
Remove setupModifiers, nResetModifiers, and nSetupShader.

core/jni/android/graphics/Shader.cpp:
Remove calls to create/destroy the (previously) attached SkiaShader.

core/jni/android_view_GLES20Canvas.cpp:
Remove native code for setupShader and resetModifiers.

graphics/java/android/graphics/BitmapShader.java:
graphics/java/android/graphics/ComposeShader.java:
graphics/java/android/graphics/LinearGradient.java:
graphics/java/android/graphics/RadialGradient.java:
graphics/java/android/graphics/Shader.java:
graphics/java/android/graphics/SweepGradient.java:
Remove code keeping track of native SkiaShader.

libs/hwui/Caches.h:
Include Extensions.h.

libs/hwui/DeferredDisplayList.cpp:
Compare shaders on the paint, instead of on DrawModifiers.

libs/hwui/DisplayList.cpp:
libs/hwui/DisplayList.h:
Remove vector of SkiaShaders.

libs/hwui/DisplayListOp.h:
Access the SkShader on mPaint.
Remove SetupShaderOp and ResetShaderOp.

libs/hwui/DisplayListRenderer.cpp:
libs/hwui/DisplayListRenderer.h:
Remove resetShader, setupShader, refShader, and mShaderMap.

libs/hwui/FontRenderer.cpp:
Pass SkShader to setupDrawShader and setupDrawShaderUniforms.

libs/hwui/OpenGLRenderer.cpp:
libs/hwui/OpenGLRenderer.h:
Add LayerShader, a class inheriting from SkShader, to mimic the
behavior of SkiaLayerShader. Unlike SkiaLayerShader, it can be set on
the SkPaint so it can be inspected later.
Set a LayerShader instead of a SkiaLayerShader.
setupDrawShader and setupDrawShaderUniforms now inspect an SkShader
passed in.
Inspect SkShader instead of mDrawModifiers.mShader.
Remove resetShader and setupShader.
setupDrawColorUniforms now takes a boolean indicating whether there is
a shader.
Add an inline function for accessing the SkShader on an SkPaint.
In setupDrawBlending(Layer*, bool), do not check the shader (which will
never be set), but do check whether the color filter may change the
alpha (newly fixed behavior).
In setupDrawBlending(SkPaint, ...), check the SkShader and whether the
color filter affects alpha (the latter is new behavior).

libs/hwui/Renderer.h:
Remove pure virtual functions setupShader and resetShader.

libs/hwui/ResourceCache.cpp:
libs/hwui/ResourceCache.h:
Remove functions for refing/unrefing shaders.

libs/hwui/SkiaShader.cpp:
libs/hwui/SkiaShader.h:
Much of this code was redundant and has been removed.
Convert structs into class with nothing but static functions for
calling describe/setupProgram.

libs/hwui/TextureCache.cpp:
libs/hwui/TextureCache.h:
Use the SkPixelRef as the key to the bitmap Lru cache, since shader
inspection will provide a different SkBitmap pointer (though it will
hold the correct SkPixelRef with the correct generation ID).

tests/CanvasCompare/src/com/android/test/hwuicompare/DisplayModifier.java:
tests/CanvasCompare/src/com/android/test/hwuicompare/ResourceModifiers.java:
Update manual test to have more shaders: radial, sweep, compose,
invalid compose.

BUG:10650594

Change-Id: Iaa7189178bda1c55f96da044d2a9fa602ba36034
/frameworks/base/libs/hwui/DisplayList.cpp
3f085429fd47ebd32ac2463b3eae2a5a6c17be25 16-Apr-2014 Chris Craik <ccraik@google.com> Clip TouchFeedbackDrawable effect to receiver Outline

Projected RenderNodes are now wrapped with a ClipRect or masked
SaveLayer, so that they are clipped to the outline of the projection
receiver surface.

Change-Id: I1d4afc1bb5d638d650bc0b1dac51a498f216773e
/frameworks/base/libs/hwui/DisplayList.cpp
087bc0c14bdccf7c258dce0cdef46a69a839b427 05-Apr-2014 John Reck <jreck@google.com> Refcount RenderNode

Change-Id: I7a86db8acc2b78ef33d987a43a119f5933d7d752
/frameworks/base/libs/hwui/DisplayList.cpp
113e0824d6bddf4376240681f9cf6a2deded9498 18-Mar-2014 John Reck <jreck@google.com> Move RenderNode to own file

Change-Id: I9380d161fd3ddd7b569c262dd8e7aa0c96151b1e
/frameworks/base/libs/hwui/DisplayList.cpp
34f67f26e355925aa1e00a20bc11e09b8dc32988 17-Mar-2014 Chris Craik <ccraik@google.com> Remove castsShadow and globalCamera APIs

Change-Id: I5c1c375f45946609b1635d952c5adf55e23bdd60
/frameworks/base/libs/hwui/DisplayList.cpp
618236fe886b84f99cd7c48ece96b16f82a9d2b2 17-Mar-2014 Chris Craik <ccraik@google.com> Revert "Remove castsShadow and globalCamera APIs"

This reverts commit 0334c314a5721f49b4d172a9cefe10f157cb28a4.

Change-Id: I64714d17fb877e1b43c65eb44820d1128281c7a2
/frameworks/base/libs/hwui/DisplayList.cpp
0334c314a5721f49b4d172a9cefe10f157cb28a4 15-Mar-2014 Chris Craik <ccraik@google.com> Remove castsShadow and globalCamera APIs

Change-Id: I4d81a7849eba60a1a9debce74eedd55d6331842d
/frameworks/base/libs/hwui/DisplayList.cpp
acb6f07623b7df3d4179f70ae03ade574616ffa6 13-Mar-2014 John Reck <jreck@google.com> Split out RenderProperties

Change-Id: Ia9888b4fb2c849d95a8c395cafef2e2294a23aae
/frameworks/base/libs/hwui/DisplayList.cpp
33896588e8f62815d3ea2bfcea59332070acf988 12-Mar-2014 John Reck <jreck@google.com> No-op isolatedZVolumen property

Change-Id: I7aa474d65a3d12efd4ffb731e07ee42f4d348183
/frameworks/base/libs/hwui/DisplayList.cpp
e18264b079481a244b30e3f71012c53bbd861f92 12-Mar-2014 John Reck <jreck@google.com> Rename DisplayList->RenderNode

Change-Id: Id42e23c9a1a6eb6eaeafef707ced7fa6887b03d0
/frameworks/base/libs/hwui/DisplayList.cpp
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/DisplayList.cpp
e361ad7ab15fcf4919a56a6293689d968ee8dcff 11-Mar-2014 Chris Craik <ccraik@google.com> Remove experimental perspective projection

Change-Id: Iad688c8395ccd4673cc129973802b5f01dfb45ba
/frameworks/base/libs/hwui/DisplayList.cpp
726118b35240957710d4d85fb5747e2ba8b934f7 08-Mar-2014 Chris Craik <ccraik@google.com> Improve shadow tessellation performance

- Tune and simplify shadow parameters
- Remove additional inner rings
- Improve polygon ray casting algorithm

Change-Id: If0f28b2d66ae0480b675942bb65e8fcd2864425d
/frameworks/base/libs/hwui/DisplayList.cpp
a88bdf8d46c94c8729c65e156ec15ebfb8c5a1c7 07-Mar-2014 John Reck <jreck@google.com> Make sure we register functor count

Bug: 13339664

Change-Id: Iafb8ba77bdf1d971c1d0a345ff525e7f7fa80352
/frameworks/base/libs/hwui/DisplayList.cpp
ef8c07c86fb810d4052fa9fa62751c46234299e9 06-Mar-2014 Chris Craik <ccraik@google.com> Merge "Draw shadows from casters together if the Z values are similar"
eea6ef9c767c734797912022113191dd255c4ae6 06-Mar-2014 Chris Craik <ccraik@google.com> Fix warnings in hwui

Change-Id: I6ad6b78531cc0426dc2ea82a32775f7b0265b5b1
/frameworks/base/libs/hwui/DisplayList.cpp
8b6f2df48e10de35d43621ce174eb3dde394725c 03-Mar-2014 Chris Craik <ccraik@google.com> Draw shadows from casters together if the Z values are similar

Change-Id: Ib5d00c83e81d9d4c384685a84988a681da8b4490
/frameworks/base/libs/hwui/DisplayList.cpp
44fd8d24f761f82d21e9b00932648a1b6bf91449 26-Feb-2014 John Reck <jreck@google.com> DisplayList overhaul

Change-Id: I53418d580c98f706e971545cff81b9921c12cc5f
/frameworks/base/libs/hwui/DisplayList.cpp
919e95cc23d3567345719f2466e089682608638e 22-Feb-2014 Chris Craik <ccraik@google.com> Modulate shadow alpha by caster alpha

Change-Id: Ibc4b3958feb3b5dba91d30af470d76555a6209c8
/frameworks/base/libs/hwui/DisplayList.cpp
e9b8817bd720cd2a294126074eb533f943a9348f 11-Feb-2014 Chris Craik <ccraik@google.com> Make outline and shadow APIs public

Change-Id: If40dc27b2fdc41c3ed355bc9029474b1344c1a03
/frameworks/base/libs/hwui/DisplayList.cpp
eef1be1d83eeb35377cfeb8a4932e317a3a975a7 10-Feb-2014 Derek Sollenberger <djsollen@google.com> Merge "Removing SkiaColorFilter and inspecting the native object directly."
b67a7bf27ba2ecdb55be2117717b6818053f47fc 08-Feb-2014 Chris Craik <ccraik@google.com> Add shadow casting / global perspective APIs, hidden for now.

Global perspective isn't yet hooked up in rendering.

Change-Id: I64ad272ea5dc523505260ce114f0a6bebdcfe9dc
/frameworks/base/libs/hwui/DisplayList.cpp
76d3a1b8d035d27bc80b0f2fc480a903bd001514 10-Dec-2013 Derek Sollenberger <djsollen@google.com> Removing SkiaColorFilter and inspecting the native object directly.

bug: 10650594
Change-Id: I4fcf66d008765afa0e35d011f58bc792183cb74f
/frameworks/base/libs/hwui/DisplayList.cpp
fad4593a3c9db193a4308c34168cc91c28218e2b 06-Feb-2014 ztenghui <ztenghui@google.com> Add the clipToOutline by just using the clipPathOp

Change-Id: I6ba23b589e579599d018600d0744be0efe2028c1
/frameworks/base/libs/hwui/DisplayList.cpp
8852ab4357ffb653bafb36f3b9272866834f7a72 07-Feb-2014 Derek Sollenberger <djsollen@google.com> Merge "Keep the SkPaint used when creating a layer."
27bfb24518934f0344c79a1d655ea8d1208d2446 07-Feb-2014 Chris Craik <ccraik@google.com> Merge "Rework and clean up DisplayList projection"
d44fbe55a9f434cb5bb0e34c143ba1445141990d 05-Feb-2014 Derek Sollenberger <djsollen@google.com> Keep the SkPaint used when creating a layer.

This will allow us to inspect the paint for thing other than
color and xfermode, such as SkColorFilters and SkShaders.

bug: 10650594
Change-Id: I2c3ddd07a3966e1e77af34136307e2b59b2898c1
/frameworks/base/libs/hwui/DisplayList.cpp
1df26446b7eac7050767c38ca977fde03a41a033 06-Feb-2014 Chris Craik <ccraik@google.com> Rework and clean up DisplayList projection

Move the projection surface to be a property of a DisplayList,
set to true for every background drawable.

Additionally, handle a projecting view background such that it doesn't
try to project onto itself (which is undesirable).

Change-Id: Ic70b17474bd87340e80767f8518f73b233419c7a
/frameworks/base/libs/hwui/DisplayList.cpp
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/DisplayList.cpp
a2fe7affd3d077ac163da90996cb2e5e0ca3b8d1 29-Jan-2014 Chris Craik <ccraik@google.com> Add initial hidden outline APIs

Background drawable outline usage and drawable outline calculation
still to come.

Change-Id: I8c7539f1638f86e1f8eb11f4fe49f705f61d58ba
/frameworks/base/libs/hwui/DisplayList.cpp
6657a6c53930eb0ff8d03317eb10ea7ddb0c49b4 26-Jan-2014 Chris Craik <ccraik@google.com> Update reordering method names, and make 3d reordering API public

IsContainedVolume -> hasIsolatedZVolume conveys that this affects Z
ordering of views

ProjectToContainedBackground -> ProjectBackwards, since it ended up
using its own projection target, separate from the 3d volume bit

Change-Id: Ia2cde838cc4da134366fe6ff623290fbd65e50c3
/frameworks/base/libs/hwui/DisplayList.cpp
3783e70b557fe58f51d551242a42e7232e991c10 27-Jan-2014 Chris Craik <ccraik@google.com> Remove logging of DisplayList staleness

Change-Id: Ie6b3af3065d4d10ec0bc9b419223d3458d297ea8
/frameworks/base/libs/hwui/DisplayList.cpp
bb615a6ffbc8a051007163916f1ed085d10b5327 24-Jan-2014 Chris Craik <ccraik@google.com> Clear root level reorder lists to prevent accessing stale DisplayLists

bug:12581401

Adds temporary logging which should log/crash earlier on incorrectly
reordering hierarchies.

Change-Id: Iee00940718c3cc868161e754aff93cd3b2747094
/frameworks/base/libs/hwui/DisplayList.cpp
cf8d9d4af3faecd804763d7c6f85b3f8741e180b 16-Jan-2014 Chris Craik <ccraik@google.com> Fix view z translation with 3d projection disabled

The ortho projection can't handle 3d translation, so skip that step if
perspective projection isn't enabled.

Change-Id: I231e6bcecc82e876b697e098e034f0fd3b06efde
/frameworks/base/libs/hwui/DisplayList.cpp
f533e947035795a485344f4c270e16507f974901 15-Jan-2014 Chris Craik <ccraik@google.com> Support projection of DisplayLists onto ancestors.

For now, ancestor views signal the acceptance of projections with a
save(0x20)/restore pair.

During the order traversal, each view with the save(0x20) code will
collect descendent views with mProjectToContainedVolume (which still
needs to be renamed) so that they can be drawn out of order later.

- *Temporary* sample code added to HwAccelerationTest.

- Note that a projected displaylist must not be clipped.

Change-Id: I45c493e845961535b958d59c53e8aff3f8891d9f
/frameworks/base/libs/hwui/DisplayList.cpp
9f68c096263b36f59c383435e587bd8bd279af34 10-Jan-2014 Chris Craik <ccraik@google.com> Simplify Z reordering logic

Change-Id: I9e36f68d7be5cfd4d69a84a51824cb9a642fe18d
/frameworks/base/libs/hwui/DisplayList.cpp
58f09b352417c4ff7e01365727cbf8a09b9bed23 09-Jan-2014 Alan Viverette <alanv@google.com> Add DisplayList bit for projecting onto a contained volume

Does not handle reordering/translating the projected DisplayList.

Change-Id: I6f1ebb2b20b7436c86fe849b35d582fd9c8a8967
/frameworks/base/libs/hwui/DisplayList.cpp
d218a92c0afb8c0d98135b20b52ac87236e1c935 03-Jan-2014 Chris Craik <ccraik@google.com> Use const where possible for drawing parameters

They should never be modified by a Renderer, only read and copied.

Change-Id: I9d8d55dca19115ee9dfeb2bb3f092ba2fb327cd4
/frameworks/base/libs/hwui/DisplayList.cpp
564acf7c9bff822f608cda0d5df0a64a9f9aaefd 03-Jan-2014 Chris Craik <ccraik@google.com> Fix Clang warnings/errors

Fix several build warnings (struct != class, int != size_t) and errors
(variable leng non-POD arrays).

Change-Id: I70b4e784365514303d8954bfcb1f39d7c22c1321
/frameworks/base/libs/hwui/DisplayList.cpp
b458942bb6e6cf13c68341dda35ef5cee060f5ae 27-Dec-2013 Chris Craik <ccraik@google.com> Create abstract base class for OpenGLRenderer

This will eventually serve as a base class to allow
DisplayListRenderer to split off from OpenGLRenderer, and could
eventually support other rendering approaches, such as an
SkCanvas/SkPicture.

This will also be the main source of (implementation-independent)
documentation of the canvas/renderer methods.

Change-Id: I52047f338f5cf86a3b0b3002af7154bff5c3c227
/frameworks/base/libs/hwui/DisplayList.cpp
d863a10b2870ca27f631b2ec69f3e13faed1d02a 19-Dec-2013 Chris Craik <ccraik@google.com> Add initial APIs for 3d view manipulation.

Change-Id: I6de00bc577d5b3a1fbc9ca3a3b3668fcfa32b867
/frameworks/base/libs/hwui/DisplayList.cpp
8b62cda49310dd6e8e9b69f651f24e47272fc3f4 18-Dec-2013 Chris Craik <ccraik@google.com> Check mDisplayListData before deref

bug:12191897
Change-Id: I72ed3801e72c657b9d7736b0efb33c5e7cfd5b57
/frameworks/base/libs/hwui/DisplayList.cpp
ba9b613437c34873fa95800a25fc51720638267c 16-Dec-2013 Chris Craik <ccraik@google.com> Create private properties on GLCanvas for experimentation with 3d

Change-Id: I17772f61efce727cb4c1111f4d97f58c741786b8
/frameworks/base/libs/hwui/DisplayList.cpp
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/DisplayList.cpp
f0a590781b2c3e34132b2011d3956135add73ae0 20-Nov-2013 Chris Craik <ccraik@google.com> Clean up quick rejection, especially surrounding points + lines.

bug:4351353

quickReject and quickRejectNoScissor have been renamed and refactored:
- to make the scissor side effect clear and explicit
- dangerous methods no longer public
- to make the simple quick reject check logic const
- simple quick reject is now conservative

This CL also fixes several issues with line and point quickRejection -
sub-pixel and hairline lines are much less likely to be incorrectly
rejected, especially at small canvas scale.

Additionally, alpha modulation for AA points < 1px in size is now
correct, dumplicating SW behavior (similar to lines and stroked
shapes work).

Change-Id: Ibb0710c721b9fb415d05acf54dd3d2b4d602156a
/frameworks/base/libs/hwui/DisplayList.cpp
1de466fc91511de8428affcf1eb71dc6af946145 13-Sep-2013 Romain Guy <romainguy@google.com> Always disable the clip for layers
Bug #8149344

Change-Id: Ifd413cadb171232eb846b3d91b05b2d2457b9f35
/frameworks/base/libs/hwui/DisplayList.cpp
66063ae2d6ff523bbf200cccdb9223d824c240a4 06-Sep-2013 Chris Craik <ccraik@google.com> Dump the right matrix when logging display lists

bug:10631274
Change-Id: I6b32bfcb3e207321da60807091d7ac0ecf6112ab
/frameworks/base/libs/hwui/DisplayList.cpp
e3b0a0117a2ab4118f868a731b238fe8f2430276 27-Jun-2013 Romain Guy <romainguy@google.com> Refcount 9-patches and properly handle GC events

This change adds refcounting of Res_png_9patch instances, the native
data structure used to represent 9-patches. The Dalvik NinePatch class
now holds a native pointer instead of a Dalvik byte[]. This pointer
is used whenever we need to draw the 9-patch (software or hardware.)

Since we are now tracking garbage collection of NinePatch objects
libhwui's PatchCache must keep a list of free blocks in the VBO
used to store the meshes.

This change also removes unnecessary instances tracking from
GLES20DisplayList. Bitmaps and 9-patches are refcounted at the
native level and do not need to be tracked by the Dalvik layer.

Change-Id: Ib8682d573a538aaf1945f8ec5a9bd5da5d16f74b
/frameworks/base/libs/hwui/DisplayList.cpp
39a908c1df89e1073627b0dcbce922d826b67055 13-Jun-2013 Chris Craik <ccraik@google.com> Fix various draw ops that may incorrectly not scissor

bug:8965976

Also consolidates quickReject scissor-ing and scissor-less paths.
Renamed plain 'quickReject' method, as it has sideEffects beyond what
the java and skia canvases do.

Change-Id: I4bdf874d3c8f469d283eae1e71c5e7ea53d47016
/frameworks/base/libs/hwui/DisplayList.cpp
9846de68f1b4f2720da421e5242017c28cfc93ed 13-Jun-2013 Chris Craik <ccraik@google.com> Remove crash workarounds, add logging

bug:9321162
Change-Id: I748c27f979af1a303be01db29aedcbad6d608c38
/frameworks/base/libs/hwui/DisplayList.cpp
e13fb01d25b22f46206115faff2c7787d330f0d1 11-Jun-2013 Chris Craik <ccraik@google.com> am 8cb26c09: am cb5d644f: Merge "Workaround possible use after delete" into jb-mr2-dev

* commit '8cb26c099dc6357340141c9d81a1131ee404ae41':
Workaround possible use after delete
9abddd54d4177d1a9790889046407da13aa7077b 10-Jun-2013 Chris Craik <ccraik@google.com> Workaround possible use after delete

bug:9321162
Change-Id: Ic35af5b5925da56e9a143e6b33658831038f3b72
/frameworks/base/libs/hwui/DisplayList.cpp
341ac60009e6b3c1114938f40743fd81a0ce034f 23-May-2013 Chet Haase <chet@google.com> am 1bf58a5a: am cfbbc864: Merge "Restore previous alpha value on noop\'d DisplayList operations" into jb-mr2-dev

* commit '1bf58a5a4c3275a8de676046da311ec0c3c61c78':
Restore previous alpha value on noop'd DisplayList operations
c725903eec82aa73ebe9682d142904c06321bc2c 23-May-2013 Chet Haase <chet@google.com> Restore previous alpha value on noop'd DisplayList operations

Previously, when a DisplayList operation was rejected because it was not
in the clip bounds, the code would not properly restore the previous
state, leading to errors in alpha values of the noop'd op being applied
to unrelated operations later in the DisplayList.

Issue #9051935 Flash of grey background when transitioning to conversation view

Change-Id: I56645cc9ebf2e07be0228ca5e249213dbeb10d7d
/frameworks/base/libs/hwui/DisplayList.cpp
6045d2b7cd0fe62d4385a053bbd1a74d64614d8e 21-May-2013 Chris Craik <ccraik@google.com> Fix DISPLAY_LIST_DEBUG

will now log ops

Change-Id: I4e119999af7ceea0558225aa78926e761277fee2
/frameworks/base/libs/hwui/DisplayList.cpp
d4b43b3cf3ee109a5251228dcc1d9bc3c25ff150 09-May-2013 Chris Craik <ccraik@google.com> Fix off by one error in log tracking

bug:8875715

Additionally moves op logging before the op is executed, to print
correctly, in pre-order traversal

Change-Id: I4e9566261f8363c73739d183e6d82b854f72ffad
/frameworks/base/libs/hwui/DisplayList.cpp
259b696b00f07938569fc9a0ea43858cdaab909b 04-May-2013 Chet Haase <chet@google.com> Fix scaled-view droppings artifact

Sometimes views that are scaled leave behind rows/columns on the
screen as they move/scale around.

The problem was that the pivot point around which the scale takes place
(in the default case of scaling around the center of the view)
was getting truncated to integer coordinates in the display list.
Meanwhile, the pivot point at the Java level was using the true float
values, resulting in a mis-match between the invalidation rectangle
(computed at the Java level) and the drawing-operation rectangle (computed
at the native level).

This only occurred when views had odd bounds (thus the integer representation
of the center differed from the float representation of the center), and only
when some other drawing operation would expand the clip rect to allow the
incorrect drawing operation (using the wrong pivot point) to draw outside of
its clip boundaries.

Issue #8617023 7x7 screen not updated correctly

Change-Id: If88889b9450d34535df732b78077a29b1f24802d
/frameworks/base/libs/hwui/DisplayList.cpp
dd671599bed9d3ca28e2c744e8c224e1e15bc914 19-Apr-2013 Chet Haase <chet@google.com> Fix quickReject logic to account for setClipChildren() setting

The rendering code optimizes by rejecting drawing operations that
lie outside of the bounds of their views. This works in most
situations, but breaks down when containers have called
setClipChildren(false), because we reject drawing that is outside
of that container, but which should be drawn anyway.

Fix is to pass in the value of that flag to the DisplayList drawing
routines which take that flag into account when deciding whether
to quickReject any particular operation.

Issue #8659277 animation clipping

Change-Id: Ief568e4db01b533a97b3c5ea5ad777c03c0eea71
/frameworks/base/libs/hwui/DisplayList.cpp
527a3aace1dd72432c2e0472a570e030ad04bf16 04-Mar-2013 Chris Craik <ccraik@google.com> Draw Operation merging

Merge simple bitmap draw operations and text operations to avoid
issuing individual gl draws for each operation. Merging other ops to
be done eventually.

The methods are different - the bitmap merging generates a single
mesh for reused, unclipped images (esp. repeated images in a listview)

The text approach queries just defers the normal font rendering until
the last drawText in the sequence that can share the same shader.

Patches are sorted and merged, but don't yet have a multiDraw
implementation. For now, the pretending-to-merge gives better sorting
behavior by keeping similar patches together.

Change-Id: Ic300cdab0a53814cf7b09c58bf54b1bf0f58ccd6
/frameworks/base/libs/hwui/DisplayList.cpp
16ecda5317c40fc3da284952d9b3add34d6763ae 29-Mar-2013 Chris Craik <ccraik@google.com> Update view's alpha and layer docs

bug:8501661

Makes the performance issues and interaction with layer type/paint
more clear.

Additionally, corrects change from 47ab7d6612e2b5b8b66fb261dafef7c91264e173
to still allow displayList alpha to override layer paint

Change-Id: Ic94d75865700820489370461cd8ac9f9077a8d90
/frameworks/base/libs/hwui/DisplayList.cpp
5f803623559aab395a29d575c37c4e39c23a4b4e 21-Mar-2013 Chris Craik <ccraik@google.com> Isolate tiling clip state from snapshot

bug:8409891

Snapshots frequently have their clip overwritten due to applying
deferred state - now, store tiling clip information in a separate
rect, outside of the snapshot so it isn't overwritten.

Change-Id: I21ca4c45dcd802eae99e8de86f11525196777ccb
/frameworks/base/libs/hwui/DisplayList.cpp
d90144db52c7297879b950cbbc85137ed123ab5b 19-Mar-2013 Chris Craik <ccraik@google.com> Update snapshot upon saveLayer deferral

bug:8409891

In order to defer fbo-targetting saveLayer operations, it's necessary
to update the snapshot at defer time so that deferred display state
(namely, clip and transform) are fbo relative.

Re-enables deferring, as the issues with saveLayer are fixed.

Change-Id: I74b0779bc732675c747208f0757c3ea85f6dfbed
/frameworks/base/libs/hwui/DisplayList.cpp
4494599e5a4931426d5649e1d1c4f9db83824ae8 20-Mar-2013 Chris Craik <ccraik@google.com> Merge "Use snapshot alpha for layers" into jb-mr2-dev
c46d07a29e94807e768f8b162ce9f77a88ba6f46 16-Mar-2013 Romain Guy <romainguy@google.com> Merge all shapes/paths caches to PathCache

This change will greatly simplify the multi-threading of all
shape types.

This change also uses PathTessellator to render convex paths.

Change-Id: I4e65bc95c9d24ecae2183b72204de5c2dfb6ada4
/frameworks/base/libs/hwui/DisplayList.cpp
a08f95cfeca7217f9c533b03663bf0dceedd259a 16-Mar-2013 Chris Craik <ccraik@google.com> Use snapshot alpha for layers

Removes mMultipliedAlpha, using the snapshot alpha for all
non-overlapping display list alpha control.

Additionally, fixes opacity issues where children of
hasOverlappingRendering=false displaylists (both hw layer sublists and
other sublists with hasOverlappingRendering=false)

Change-Id: I6adc16da855835f9f518f8967628e5d0135c789b
/frameworks/base/libs/hwui/DisplayList.cpp
ff78583d8a73ca35ce65b5d2592570ff6fb9901b 08-Mar-2013 Chris Craik <ccraik@google.com> Fully deferred displaylist replay

bug:8037003

A recursive drawDisplayList call is now entirely deferred before
playing back to the screen and issuing GL commands. This way, the
entire stream can be inspected, optimized, and batch work (such as
uploading textures) before issuing commands.

Additionally, this fixes an issue where operations draw could move
across restores corresponding to saveLayer(alpha). Those and other
similar cases (such as complex clipping, requiring the stencil) are
now treated as batching barriers, with the operations that change
renderer state in a way that's difficult to defer are just re-issued
at flush time.

Change-Id: Ie7348166662a5ad89fb9b1e87558334fb826b01e
/frameworks/base/libs/hwui/DisplayList.cpp
8afce816df7e8f668761f7ed443f54238958c49f 07-Mar-2013 Romain Guy <romainguy@google.com> Round scale factors to rasterize text

Harder, better, faster, stronger.

Change-Id: Iee4125de98c4e61603f56bb7f06002cc86458214
/frameworks/base/libs/hwui/DisplayList.cpp
ba868c3e2297bd75cd3f8bb1f9eaa286855a1919 23-Feb-2013 Chris Craik <ccraik@google.com> Add deferredList null check

Needed for non-deferred mode (debug.hwui.disable_draw_defer = true)

Change-Id: I278cbe200aa6ce06fa92dc45c63ceda6e85a0cbe
/frameworks/base/libs/hwui/DisplayList.cpp
505d1d64eda6e47caabf8701cb39ec9b176b3238 22-Feb-2013 Romain Guy <romainguy@google.com> Merge "Prettify display lists logging"
7031ff68bb998dbbd7caf3b2fd75eef747a86725 22-Feb-2013 Romain Guy <romainguy@google.com> Prettify display lists logging

This change makes it a lot easier to see the tree structure.

Change-Id: I4969abd1eb010f1d529671f8d86dc4c930be24f6
/frameworks/base/libs/hwui/DisplayList.cpp
b98a016c6769b9e80d392df22fe77a2fca048d9f 21-Feb-2013 Chris Craik <ccraik@google.com> Fix clipping and stencil layer issues

bug:8235699

Ensure rectangle clipping operations disable deferring when necessary
(i.e., when the op might create a non-rect region), including in
DisplayList::setViewProperties

Additionally, makes clipping with a kUnion always use a region, for
consistency with software rendering

Change-Id: I6730f1a80250bcf3f91cd4afde646d470a12dbc2
/frameworks/base/libs/hwui/DisplayList.cpp
8a47d8eaec26d0937aee94a057f561f246748339 20-Feb-2013 Chris Craik <ccraik@google.com> Merge "Clean up clipping and deferral logic"
5d11676414b3606792e23c269cf75b44faa1a2af 20-Feb-2013 Chris Craik <ccraik@google.com> Clean up clipping and deferral logic

bug:8037003

-Merges replay methods
-Bounds checking for DrawBitmapMesh, DrawRects and DrawDisplayList
-Use clip as bounds for otherwise unbounded draw operations

Clip-as-bounds is correct for drawColor and functor, but other draw
operations (pos text, text on path, and layers) still need true bounds
calculation

Change-Id: I5d5149d2c624f01e3fe46628bf156e835e69b9d5
/frameworks/base/libs/hwui/DisplayList.cpp
52036b19a5f82bc4d75cfcbff99c65df8d25a99b 15-Feb-2013 Romain Guy <romainguy@google.com> Expose display list APIs

The exposed APIs are slightly simpler than the full APIs used internally.
Only APIs useful to applications are exposed.

Change-Id: Ie03014628d40ad5ef63dedbc52ce3def84429d54
/frameworks/base/libs/hwui/DisplayList.cpp
c3566d06421c8acc0aafb18f7e307e5725ce87e1 05-Feb-2013 Chris Craik <ccraik@google.com> DisplayList draw operation reordering

bug:8037003

The reordering enables similar operations to draw together, minimizing the
OpenGL state change operations that go inbetween draws. Eventually, multiple
complete canvas draw operations will be merged (into a single glDrawArrays call,
for example)

Reorders DisplayList draw operations when:

-They can move backwards in the command stream to be after similar
operations without violating draw ordering

-The OpenGLRenderer is in a simple, replayable state (no complex clip,
or filter/shadow etc)

Also adds two system properties to control the deferral/reordering:
"debug.hwui.disable_draw_defer"
"debug.hwui.disable_draw_reorder"
which can be set to "true" to control the display list manipulation

Change-Id: I5e89f3cb0ea2d2afd3e15c64d7f32b8406777a32
/frameworks/base/libs/hwui/DisplayList.cpp
0776a6069365bdea83855db154fa2d37f9d1d808 15-Feb-2013 Chris Craik <ccraik@google.com> Move DisplayList to its own cpp file

Change-Id: Ic9c1bbf4673ad5c756f3908b2ab7e699edd6a119
/frameworks/base/libs/hwui/DisplayList.cpp