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
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
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
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
The exposed APIs are slightly simpler than the full APIs used internally.
Only APIs useful to applications are exposed.
Change-Id: Ie03014628d40ad5ef63dedbc52ce3def84429d54
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