History log of /frameworks/base/libs/hwui/DeferredDisplayList.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7df9ff2a08fd4bbd9b2e734a357cffcf64675df9 11-Feb-2016 John Reck <jreck@google.com> Fix all LA memory leaks forever!

Bug: 27072626

Or at least fix this one and make it harder to leak
going forward. static_asserts are cool, use them liberally

Also makes allocation via LA (slightly) faster by fixing create*
variants to use rvalue references & std::forward, preventing
an accidental pass-by-value

Change-Id: I18fd696a93dd6ea49c8d8c587d4c8bee56dbfdf5
e537330ead4111cae74668bbc25a332e186d6c91 11-Feb-2016 John Reck <jreck@google.com> Revert "Fix all LA memory leaks forever!"

This reverts commit 499d83f21e7ffb687788bba1668b05fe38f6ebaf.

Change-Id: Ia893ae16ebbeae68e49cd13a20587104b73d39a0
499d83f21e7ffb687788bba1668b05fe38f6ebaf 11-Feb-2016 John Reck <jreck@google.com> Fix all LA memory leaks forever!

Bug: 27072626

Or at least fix this one and make it harder to leak
going forward. static_asserts are cool, use them liberally

Also makes allocation via LA (slightly) faster by fixing create*
variants to use rvalue references & std::forward, preventing
an accidental pass-by-value

Change-Id: I5e0e36e72c6dd93324194ebf9a95f8204f05f261
b565df13a9e5c7b1d7d93bdfa4a793752d66d3cc 05-Oct-2015 Chris Craik <ccraik@google.com> Initial commit of new Canvas operation recording / replay

- 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
0e26fc471d0a9084f6ad2b97eebadfea9763b855 02-Oct-2015 Chris Craik <ccraik@google.com> Merge "Simplify DeferredDisplayList construction"
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
b45c6aa665624013ef3b207fffcfe265041f6bff 29-Sep-2015 Chris Craik <ccraik@google.com> Simplify DeferredDisplayList construction

Change-Id: I385bd894fda097e35abb8f8d5eb8271f10bd163b
272a685f17cc4828257e521a6f62b7b17870f75e 30-Jul-2015 John Reck <jreck@google.com> Replace most usages of utils/Vector.h

Change-Id: I540d1b3523244d6c71fc52d6fb30555271c25644
fca52b7583d1e5f5ff8ed06554875d2a30ef56fa 28-Apr-2015 Chris Craik <ccraik@google.com> Use path intersection instead of saveLayer+mesh to mask projected ripples


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
8df5ffa9ae0667d9e0241adf4675753156fcef84 29-Apr-2015 Chris Craik <ccraik@google.com> Remove concept of layer alpha override

Change-Id: I9e150fe4a1b2c0cf140519a33c02fd4771ef1c50
b5bc454870c8b7df88a633b18c4c6499361c3a08 24-Apr-2015 John Reck <jreck@google.com> Teach LA how to destroy

Change-Id: I57ab30b6d56370dade6987f442136ea5e5546c9b
e84a208317e0ed388fcdad1e6743c7849acb51b0 22-Dec-2014 Chris Craik <ccraik@google.com> Add overrides and switch to nullptr keyword

Changes generated with clang-modernize.

Additionally, fixed some struct-vs-class usage to make clang happy.

Change-Id: Ic6ef2427401ff1e794d26f21f7b44868fc75fb72
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


Partial revert of 23d307c8d88f4a3849163b9e5b7cd11d0d4f372c.

Change-Id: Ic8b91b046707fc5b8fa53c35ea7b37bb19c3c943
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
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
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

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


Change-Id: Ifd533eb8839a254b0d3a5d04fc5a2905afdfc89e
23d307c8d88f4a3849163b9e5b7cd11d0d4f372c 27-Oct-2014 John Reck <jreck@google.com> Cleanup debug options

Bug: 18138852
Bug: 18065434
Change-Id: Ibb07b73b147c2a8b287fe8aee3f6624582f21b00
3b20251a355c88193c439f928a84ae69483fb488 23-Jun-2014 John Reck <jreck@google.com> No-fail invokeFunctor

Bug: 15513308
Bug: 15449247

Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
deeda3d337aed1eee218b89a7aba5992ced371f0 06-May-2014 Chris Craik <ccraik@google.com> Round rect outline clipping

Change-Id: Iee9cf4f719f6f1917507b69189ad114fa365917b
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
c1c5f0870282b56dafe5a4d756e4b9e6884655a7 12-Sep-2013 Chris Craik <ccraik@google.com> Move DeferredDisplayState out of ops


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
7f6d6b0370df4b5a9e0f45bffc31ea6caeeb509d 06-Aug-2013 Romain Guy <romainguy@google.com> Split assets atlas batches
Bug #10185769

The assets atlas contains assets that need to be blended and assets
that do not need to be blended. With a single merge id, currently
set to be the pointer to the atlas itself, draw ops merging could
generate batches of commands containing both opaque and translucent
assets. The blend state was chosen from only one of the assets in
the batch, leading either to inefficiencies (blending large opaque
assets) or incorrect behaviors (not blending translucent assets.)

This change introduces two new merge ids in the atlas: an opaque
key and a blend key. These keys are simple booleans set to false
and true respectively (the values do not matter really.) Their
memory addresses are used as the merge ids when createing draw ops
batches, allowing all opaque ops to be batched together and all
translucent ops to be batched together.

Change-Id: I114dba0533c44987e53864b471ccb28c811f2025
5e49b307eb99269db2db257760508b8efd7bb97d 31-Jul-2013 Chris Craik <ccraik@google.com> Fix quickReject's handling of AA ramp geometry

By having quickReject round out the window-space geometry bounds, we
prevent the AA perimeter (which falls outside the local bounds passed
in) from drawing outside the clip.

Change-Id: I8ee36be9039a9c47906815ee2f0dbaa5eb910b82
f70119cd776f871a82c94be8522dce02e04c73a8 13-Jun-2013 Chris Craik <ccraik@google.com> Reset batching state when overlap batch deletion occurs

Change-Id: Ifdbee9baaa734e27d15d2b54aa3b3abfffbce1e9
28ce94a4ffc7576f40776d212f1ada79fafaa061 31-May-2013 Chris Craik <ccraik@google.com> Overdraw avoidance and merging of clipped ops


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
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
1206b9bba91f7ed899c5c87427cce725fe5aadfc 04-Apr-2013 Chris Craik <ccraik@google.com> Traverse layers in update order


Layers now require traversal in update order, as it will be child
first, then parent for layer-in-layer

Fixes issue with deferred layer playback not flushing in order, and
thus child not painting before parent

Also fixes DisplayList to only be cleared after flush in deferred list

Change-Id: I2f284d00079cdb20798aeef6a1c94e823940db40
7273daace9303f4662444111c40bb83d3ead4a92 28-Mar-2013 Chris Craik <ccraik@google.com> Fix issues related to saveLayer/restore deferral


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
96885eb480c5e0526fe2f77d30f6e551f3f3ceab 26-Mar-2013 Romain Guy <romainguy@google.com> Avoid multiple font cache texture uploads
Bug #8378964

This change defers drawing into layers until after the renderer for FBO0
is ready to draw. At that point, all the precaching is done which means
all glyphs can be uploaded at once in the font caches.

Change-Id: Ie1f7a7ff30f76f06fb3dbc72c7d05e66207d1ecb
d90144db52c7297879b950cbbc85137ed123ab5b 19-Mar-2013 Chris Craik <ccraik@google.com> Update snapshot upon saveLayer deferral


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
ff78583d8a73ca35ce65b5d2592570ff6fb9901b 08-Mar-2013 Chris Craik <ccraik@google.com> Fully deferred displaylist replay


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
c3566d06421c8acc0aafb18f7e307e5725ce87e1 05-Feb-2013 Chris Craik <ccraik@google.com> DisplayList draw operation reordering


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:
which can be set to "true" to control the display list manipulation

Change-Id: I5e89f3cb0ea2d2afd3e15c64d7f32b8406777a32