History log of /frameworks/base/libs/hwui/DeferredDisplayList.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
eecff56fed5dd5206acfbc5007b4912081b36d3b 21-Dec-2015 Florin Malita <fmalita@google.com> Add internal Canvas save flags

Skia's SkCanvas::SaveFlags are being deprecated. This CL introduces
the equivalent android::SaveFlags, converts all internal clients to
the new enum, and switches the saveLayer glue to the
SaveLayerRec-based API.

Change-Id: Icb1785f4e7c0f652b1f04b34a1e3ccb063c408f3
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
b565df13a9e5c7b1d7d93bdfa4a793752d66d3cc 05-Oct-2015 Chris Craik <ccraik@google.com> Initial commit of new Canvas operation recording / replay

Done:
- drawRect, drawBitmap, drawColor, drawPaint, drawRenderNode, drawRegion
- Recording with new DisplayList format
- batching & reordering
- Stateless op reorder
- Stateless op rendering
- Frame lifecycle (clear, geterror, cleanup)

Not done:
- SaveLayer (clipped and unclipped)
- HW layers
- Complex clipping
- Ripple projection
- Z reordering
- Z shadows
- onDefer prefetching (text + task kickoff)
- round rect clip
- linear allocation for std collections
- AssetAtlas support

Change-Id: Iaf98c1a3aeab5fa47cc8f9c6d964420abc0e7691
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
f6049a5c55645d31002aad7336119b813034a6f6 02-Oct-2015 Chris Craik <ccraik@google.com> Merge "Move more utils into paintutils"
0e26fc471d0a9084f6ad2b97eebadfea9763b855 02-Oct-2015 Chris Craik <ccraik@google.com> Merge "Simplify DeferredDisplayList construction"
bf6f0f260886a04a1680c7f9917124a751322ca4 01-Oct-2015 Chris Craik <ccraik@google.com> Move more utils into paintutils

Change-Id: I1eb3fd52386bc61a592da235533e40b509eeec24
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
f236d7ffadd918a2a50f7cbd04349ad2222644b7 01-Oct-2015 Sergio Giro <sgiro@google.com> resolved conflicts for 31e5ded6 to master

Change-Id: Iae4e1abe697f1c00a82b54c17afa7d4edddc006b
6706b71d7cfb9a916fd482189c04a0d59c19c103 01-Oct-2015 Sergio Giro <sgiro@google.com> am 86e67d70: Merge "frameworks/base: delete TinyHashMap"

* commit '86e67d708d738807c843850a3b6c9170e514ff8f':
frameworks/base: delete TinyHashMap
1673035f051aa5da7e98bf7ad6acc5ae4e27a5df 30-Sep-2015 Sene Gales <sgiro@google.com> frameworks/base: delete TinyHashMap

In DeferredDisplayList use std::unordered_map instead of TinyHashMap

Towards deprecation of BasicHashTable

Change-Id: I91b8d5dc80444c88fecff9c362fa610cca253973
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
b45c6aa665624013ef3b207fffcfe265041f6bff 29-Sep-2015 Chris Craik <ccraik@google.com> Simplify DeferredDisplayList construction

Change-Id: I385bd894fda097e35abb8f8d5eb8271f10bd163b
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
c08820f587ad94698691a6657e87712de07e484c 22-Sep-2015 Chris Craik <ccraik@google.com> Remove lookup3 gamma code

Also clean up gamma / glyph cache properties

Change-Id: I75b1ac0cb55638bf787ffd3cf457483ae314f03b
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
272a685f17cc4828257e521a6f62b7b17870f75e 30-Jul-2015 John Reck <jreck@google.com> Replace most usages of utils/Vector.h

Change-Id: I540d1b3523244d6c71fc52d6fb30555271c25644
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
5a4690bf26932c0d6940e4af8516d920e09ae81a 14-Jul-2015 Chris Craik <ccraik@google.com> Clean up unncessary defines

LOG_TAG and TRACE_TAG are already defined in the makefile

Change-Id: I9e53e3dacbe018441edd74cb7c8c90846defee74
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
b1f990de4075866ad8f40849c01d58b2dac8b1e5 12-Jun-2015 Chris Craik <ccraik@google.com> Fix roundrect clipping / blending ordering

bug:21803918

Also, don't consider rr clipped ops opaque, and put stage
checking behind a debug flag.

Change-Id: I9304ae571337a7cf835524682d1a590a21d30fa4
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
fca52b7583d1e5f5ff8ed06554875d2a30ef56fa 28-Apr-2015 Chris Craik <ccraik@google.com> Use path intersection instead of saveLayer+mesh to mask projected ripples

bug:14297149

SaveLayer's performance cost is high, and proportional to the surface
being projected onto. Since ripples (even unbounded ones) are now
always projected to the arbitrary background content behind them, this
cost is especially important to avoid.

This removes the last semi-secret, saveLayer from the projected
ripple implementation.

Also fixes the HW test app to correctly demonstrate this projection
masking behavior.

Additionaly, alters PathTessellator to gracefully handle
counter-clockwise paths, and simplifies the work done by
ShadowTessellator to ensure all of its paths are counterclockwise.

Change-Id: Ibe9e12812bd10a774e20b1d444a140c368cbba8c
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
2507c34d91bb0d722b6012e85cb47387b2aa6873 04-May-2015 Chris Craik <ccraik@google.com> Cleanup properties

bug:19967854

Separate properties from Caches, into static, RenderThread-only class.

Also rewrites the means for java to set properties to correctly handle
threading, and adds an override for profile bars so that SysUi doesn't clutter
the screen with them.

Change-Id: I6e21a96065f52b9ecc49d1a126244804ba106fa9
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
8df5ffa9ae0667d9e0241adf4675753156fcef84 29-Apr-2015 Chris Craik <ccraik@google.com> Remove concept of layer alpha override

bug:19412691
Change-Id: I9e150fe4a1b2c0cf140519a33c02fd4771ef1c50
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
2ae07339824efc50468f971ff8920ff0b894cad4 21-Jan-2015 Chris Craik <ccraik@google.com> Remove DisplayListLogBuffer

Change-Id: I001832fc444b6d532f4a382e0a31cc1d8956dbd8
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
d41c4d8c732095ae99c955b6b82f7306633004b1 06-Jan-2015 Chris Craik <ccraik@google.com> Add overrides and switch to nullptr keyword for all files

Adds remaining missing overrides and nullptr usages, missed due to
an extreme failure in tool usage.

Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
a5f0918ec1931ee6c784f068e07d0aaa04525932 18-Dec-2014 Chris Craik <ccraik@google.com> resolved conflicts for merge of fd461ede to master

Change-Id: I36f263c7e6d96355dd8a2c3565581b9a983ae481
fd461edee007a654dc163b397445cd071f04caf9 17-Dec-2014 Chris Craik <ccraik@google.com> am 93492d1a: am c748832f: Merge "Revert overdraw avoidance visualization change" into lmp-mr1-dev

* commit '93492d1a478770783abab764855c8d47e0264f71':
Revert overdraw avoidance visualization change
ef8d6f272ae451aaedb0f02249c0f9f0576efdf3 17-Dec-2014 Chris Craik <ccraik@google.com> Revert overdraw avoidance visualization change

bug:18787324

Partial revert of 23d307c8d88f4a3849163b9e5b7cd11d0d4f372c.

Change-Id: Ic8b91b046707fc5b8fa53c35ea7b37bb19c3c943
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
f088c349dfea985e561d7e838ecd41be5168cd4a 12-Dec-2014 John Reck <jreck@google.com> Fix style

Change-Id: I7227b0eac126bf470ed50249a7809b845872983b
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
64bb413a664001c95c8439cf097dc3033f4ed733 22-Nov-2014 Andreas Gampe <agampe@google.com> Revert "resolved conflicts for merge of 220c3f4f to master"

Reverted as hwui doesn't agree.

This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9.

Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
8a902d9f24e83c87b054adb5836b4a5b8a257be9 22-Nov-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 220c3f4f to master

Change-Id: I37ecce8fddecdff82b0eace16f1ee75152f7171e
2ab8298dc37851aab4623ba3f98d71055d653a73 21-Nov-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 99377df1 to lmp-mr1-dev-plus-aosp

Change-Id: I3a98f55832ac447b1ed0dd129c7a93d088025943
42ddc18d108f789705ad4eb697ce9599ad322507 21-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Unused parameters in hwui

Remove Clang cutout for unused parameters. Fix warnings.

Remove Clang cutout for deprecated Skia function usage. Has been
fixed in the L push.

Change-Id: I7ea073ff67127cc1e14e798b655e2c50615fe8e7
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
edaecc1db0584fa017822dfc2da0c968b53967e6 11-Nov-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 1d03b816 to lmp-mr1-dev-plus-aosp

(cherry picked from commit 1272887050a269d6d506b42099c2857847ad100b)

Change-Id: Ib673768fe5fc03615626ef4b10590e5317f22172
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
1272887050a269d6d506b42099c2857847ad100b 11-Nov-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 1d03b816 to lmp-mr1-dev-plus-aosp

Change-Id: Ib673768fe5fc03615626ef4b10590e5317f22172
1e19674107e1aa2224c2b8c7d12bfa057efe80ea 11-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Wall Werror in libs/hwui

Turn on -Wall -Werror in libs/hwui. Fix errors.

Change-Id: I74962d08c889712dacbd0d86d6760fc10802b6bd
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
107843de4507b3511006cb9c77b8d0364374385a 08-Sep-2014 Tom Hudson <tomhudson@google.com> Remove status return from all uirenderer::Renderer functions

This moves the interface closer to android::Canvas. The only use of
return values was in the OpenGLRenderer subclass; that is replaced
with an internal dirty flag: returned from finish(), checked by
CanvasContext.

This is part of a series of CLs to refactor the Graphics JNI bindings.

BUG:15672762
R=djsollen@google.com,ccraik@google.com

Change-Id: Ifd533eb8839a254b0d3a5d04fc5a2905afdfc89e
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
a8f1bce008fadff43eb15a0ac9c4056fa3192260 28-Oct-2014 John Reck <jreck@google.com> am c7c8b069: Merge "Cleanup debug options" into lmp-mr1-dev automerge: b0aeaad automerge: 49a01fc

* commit 'c7c8b069407236bcc04c086912c73002d48419ef':
Cleanup debug options
23d307c8d88f4a3849163b9e5b7cd11d0d4f372c 27-Oct-2014 John Reck <jreck@google.com> Cleanup debug options

Bug: 18138852
Bug: 18065434
Change-Id: Ibb07b73b147c2a8b287fe8aee3f6624582f21b00
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
09c2d4fe15fbac2faf8a97ba2cc59132ee12222a 15-Oct-2014 Derek Sollenberger <djsollen@google.com> Refactor HWUI to better handle Canvas DrawFilters.

First, this CL removes the need to decompose the DrawFilters
in Java and instead passes the SkDrawFilter to HWUI directly.
This also allows the removal of duplicated logic between HWUI
and other Canvas implementations regarding Paint filter levels.

Second, the DrawFilter is now stored in the DisplayListRenderer
where we apply it to every paint BEFORE it is stored in the
DisplayList. This eliminates the need to filter all Paints on
playback and removes additional complexity at playback.

Finally, as a result of storing the filtered paint we can now
do a better job caching the paints. This takes advantage of
recent changes in Skia to quickly enable quick hashing and
comparison of paint objects.

Change-Id: Iec507a2d894827975cc4f1d22241542bb0534b4e
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
3b20251a355c88193c439f928a84ae69483fb488 23-Jun-2014 John Reck <jreck@google.com> No-fail invokeFunctor

Bug: 15513308
Bug: 15449247

Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
d490aa426090fc358873821b47ef27ead0c97409 23-May-2014 Chris Craik <ccraik@google.com> Merge "Inspect SkShader to determine hw shader."
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/DeferredDisplayList.cpp
deeda3d337aed1eee218b89a7aba5992ced371f0 06-May-2014 Chris Craik <ccraik@google.com> Round rect outline clipping

Change-Id: Iee9cf4f719f6f1917507b69189ad114fa365917b
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
c29a0a4664a4b9871fadd668b632469a0db240b9 31-Mar-2014 Derek Sollenberger <djsollen@google.com> Avoid caching shadow properties in Java & HWUI.

bug: 10650594
Change-Id: I6f57df002710bb0567ed7e53fc0bfe96cfd504b8
/frameworks/base/libs/hwui/DeferredDisplayList.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/DeferredDisplayList.cpp
a42ceb03cf6a1cbcd9f526afb02d806b2c200ee3 18-Sep-2013 Chris Craik <ccraik@google.com> Merge "Disallow negative scale matrices in merged Bitmap drawing" into klp-dev
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/DeferredDisplayList.cpp
5af5fc50c2f43fc0e0813e02cb6a950901a9c0b8 13-Sep-2013 Chris Craik <ccraik@google.com> Fix merged operation clipping

bug:10745870

Missing 'const' meant MergingDrawBatch would never clip anything.

Change-Id: Ia6367eff94cf5f437efafbc3ba7f0da102ffd956
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
c1c5f0870282b56dafe5a4d756e4b9e6884655a7 12-Sep-2013 Chris Craik <ccraik@google.com> Move DeferredDisplayState out of ops

bug:9969358

Instead of storing DeferredDisplayState within an op (thus forcing ops
to be tied to a single state instance), associate each op with a new
state at DeferredDisplayList insertion time.

Now, DisplayLists (and the ops within) can be reused in a single
DeferredDisplayList draw call, as ops will use different state
instances at different points in the frame.

Change-Id: I525ab2abe0c3883679f2fa00b219b293e9ec53d9
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
0e87f00f8cb79635aa70b9a2dfa02bf19dc7473d 20-Jun-2013 Chris Craik <ccraik@google.com> Initialize MergingDrawBatch clip with viewport bounds

This allows merged, clipped operations to behave correctly within a
savelayer, even if the base viewport has a large offset.

Additionally, disregard opaqueness when within a
complexclip/savelayer, as the coverage can't be trusted.

Change-Id: Ic908b82a4bb410bc7fac1b4295f4874ed166efc5
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
36d38cb904556025b76c6d98f9fe2ccfa1c8a304 17-Jun-2013 Chris Craik <ccraik@google.com> Merge "Better handle op size edge cases"
d72b73cea49f29c41661e55eb6bfdbc04f09d809 17-Jun-2013 Chris Craik <ccraik@google.com> Better handle op size edge cases

bug:9464358

Previously, empty and unknown sized ops are assumed to fully cover
their clip. This is now corrected such that empty sized ops are
pre-rejected before defer. Additionally, unknown sized ops disable
overdraw avoidance.

Change-Id: Icf2ce24f98be5ea6299e24ffcf826790373564a1
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
a02c4ed885d97e516f844ddb0a96083f1b45b4cb 14-Jun-2013 Chris Craik <ccraik@google.com> Fix clip merging behavior

Previously, a new op with a clipped side could be added to a
MergingDrawBatch without considering the batch's current bounds.

Change-Id: I1b873ecf821bad7cda6630c3f311edd90ac5cc8c
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
f70119cd776f871a82c94be8522dce02e04c73a8 13-Jun-2013 Chris Craik <ccraik@google.com> Reset batching state when overlap batch deletion occurs

Change-Id: Ifdbee9baaa734e27d15d2b54aa3b3abfffbce1e9
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
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/DeferredDisplayList.cpp
7f77736599c39cdd5540168fc652cf6846799a33 22-May-2013 Romain Guy <romainguy@google.com> Merge "Merge scaled bitmaps with translated bitmaps"
2db5e993b626794eb07a0ff354269f9a77da81b3 22-May-2013 Romain Guy <romainguy@google.com> Merge scaled bitmaps with translated bitmaps

Change-Id: I03089f48f97b69fcb4a0171984d3ff548d41c4a8
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
41541825bc90dac740e424cdd41a8c997e15cdb7 04-May-2013 Chris Craik <ccraik@google.com> Use individual glyph positions to determine text bounds.

bug:8766924

Previously text bounds were calculated to be from 0 to totalAdvance in
the X, and from the font's top to bottom. These are incorrect,
especially in light of the font fallback mechanism.

Now, we calculate the bounds of the text as we layout each glyph.
Since these are much tighter bounds in the common case, this
significantly reduces the amount of clipping required (which in turn
enables more aggressive text merging).

Change-Id: I172e5466bf5975bf837af894a9964c41db538746
/frameworks/base/libs/hwui/DeferredDisplayList.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/DeferredDisplayList.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/DeferredDisplayList.cpp
cf51a4199835e9604aa4c8b3854306f8fbabbf33 09-Apr-2013 Romain Guy <romainguy@google.com> Introduce PixelBuffer API to enable PBOs

PBOs (Pixel Buffer Objects) can be used on OpenGL ES 3.0 to perform
asynchronous texture uploads to free up the CPU. This change does not
enable the use of PBOs unless a specific property is set (Adreno drivers
have issues with PBOs at the moment, Mali drivers work just fine.)

This change also cleans up Font/FontRenderer a little bit and improves
performance of drop shadows generations by using memcpy() instead of
a manual byte-by-byte copy.

On GL ES 2.0 devices, or when PBOs are disabled, a PixelBuffer instance
behaves like a simple byte array. The extra APIs introduced for PBOs
(map/unmap and bind/unbind) are pretty much no-ops for CPU pixel
buffers and won't introduce any significant overhead.

This change also fixes a bug with text drop shadows: if the drop
shadow is larger than the max texture size, the renderer would leave
the GL context in a bad state and generate 0x501 errors. This change
simply skips drop shadows if they are too large.

Change-Id: I2700aadb0c6093431dc5dee3d587d689190c4e23
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
1ed30c907ffbb71d1bc448ee57c66b0d16f600ef 03-Apr-2013 Chris Craik <ccraik@google.com> Correct save/restore match up

bug:8480642

With the additional save/restore around the operations in flush, the
stored restore batches weren't matching up to the correct saves.

Change-Id: I2f48f19009bd97289b6973283f43dc8d3e35affd
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
7273daace9303f4662444111c40bb83d3ead4a92 28-Mar-2013 Chris Craik <ccraik@google.com> Fix issues related to saveLayer/restore deferral

bug:8464795

Changes drawModifiers and alpha to be restored for all operations,
since saveLayer/restore use these values, not just draw operations

Also forces a renderer state restoration before a deferred restore op
is played back, in case it is associated with a saveLayer that
doesn't have the save_clip flag set

Change-Id: I9da5d44fefbfffdee164c98f4f139843dacf85df
/frameworks/base/libs/hwui/DeferredDisplayList.cpp
a4e16c58c9e3c983251e0475125a2a6f5bec2dbf 22-Mar-2013 Chris Craik <ccraik@google.com> Restore final canvas state after deferred flush

bug:8450062

- Fixes overdraw indication with DeferredDisplayList
- Fixes drawHardwareLayer called after flush

Additionally changes drawLayer to pass its paint to native via setLayerPaint

Wrap flush in save/restore so that reordering doesn't affect final
transform

Change-Id: I08befa42c28500da6387699eefd4be28aedf9f4c
/frameworks/base/libs/hwui/DeferredDisplayList.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/DeferredDisplayList.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/DeferredDisplayList.cpp
d0afeac6dfc0856eeb72e6176ad6335e81871d24 16-Mar-2013 Chris Craik <ccraik@google.com> Reset draw modifiers after flushing

bug:8401910

This avoids leaving the renderer in a state with stale pointers (to,
e.g., shaders or color filters)

Change-Id: Idf8b63657041352e70e34e91ea416fe4385d4bc2
/frameworks/base/libs/hwui/DeferredDisplayList.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/DeferredDisplayList.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/DeferredDisplayList.cpp
0f6675332c04c74909425d1d328f02b32c0ff40e 01-Mar-2013 Romain Guy <romainguy@google.com> Precache glyphs at final raster size

The deferred display lists model now allows us to precache glyphs
at their exact size on screen.

This change also removes debug markers when the renderer defers
and reorders display lists. It also adds a flush event marker.

Change-Id: I66ec5216dc12b93ecfdad52a7146b1cfb31fbeb4
/frameworks/base/libs/hwui/DeferredDisplayList.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/DeferredDisplayList.cpp