destroyHardwareResources will now only force-destroy
the specific node it was called on, which are only
ever the root nodes. Rely on onRemovedFromTree()
to clean up resources for all other nodes.
Bug: 34736819
Test: RenderNode.multiTreeValidity passes, manually
verified fixes b/34736819
Change-Id: I1c275ad6a98b63bf50f265602f09bffe3e1f169b
* Move mValid to native
* Have destroyHardwareResources destroy everything
* Remove flaky mParentCount checks in setStaging
* All tree updates have an internal observer to
ensure onRemovedFromTree() is a reliable signal
* onRemovedFromTree() immediately releases resources
to avoid displaylist "leaks"
Test: Unit tests for validity added & pass, manually
verified that b/34072929 doesn't repro
Bug: 34072929
Change-Id: I856534b4ed1b7f009fc4b7cd13209b97fa42a71c
Test: Compared to OpenGL pipeline and sanity checked
with understanding of the drawing pipeline. Also
wrote a unit test.
BUG:32370375
Change-Id: Iab397d21f0def725fa89551d48c764c67fd2bda8
There is only one caller each for the static functions here so this
CL moves the logic to the caller. Also by moving some of the code
into the pipeline it makes it easier for future changes to configure
how a pipeline handles a layer.
Change-Id: Ib735b5154325cbb658fd151f7a19dbf434ab44b7
bug:29127615
Primarily fixes case where 0 dimensioned layers could be
created/updated. Additionally, adds more logging in incomplete
framebuffer cases, if they still occur.
Change-Id: Ib90dbbafd6905aca3c8f46e64064e13a308f713d
This CL changes the target of VD specific animators to VectorDrawable,
instead of RenderNode. The benefit of doing so is that animators can
now detect whether the animation is meaningful by checking whether
their VD target is in the display list. If not, that means the VD is
not drawing for the current frame, in which case we can be smarter
and more power efficient by removing the animator from the list and
posting a delayed onFinished listener callback.
By setting VD as the animation target, when an ImageView decides to
update its drawable from one AVD to something else, we'll be able
to detect that the previous AVD is no longer in the display list,
and stop providing animation pulse to the stale AVD, which is
something we couldn't do previously. This change also
handles the case where one AVD instance could be drawn in two
different views.
Bug: 27441375
Change-Id: Iaad1ed09cfd526276b95db0dd695275c28e074e8
Bug: 27709981
This desperately needs a refactor, but to keep
the current (really needed & nice) behavior of
dispatching after sync finishes would be difficult
to handle cleanly without lots of ripping so... #yolo
Change-Id: I831a06c6ae7412a062720d68ecbe3085190f0258
This CL introduces staging properties to VectorDrawable, which holds
properties coming from UI thread. When staging properties are changed,
they are marked dirty, and the staging properties then get pushed to
RenderThread at sync point. In cases where no staging property has
been changed, at sync point we sync the render thread properties back
to staging properties to reflect the latest render thread animation
value change.
Also, update Vector Drawable bitmap only when it's dirty
Bug: 27343970
Bug: 27385912
Bug: 27263667
Bug: 27927674
Bug: 27774383
Change-Id: Ia864f5400a53a08dbfb284fae581fb1aac4fff87
-Only add animators to a RenderNode when its owning view is attached
-When changing animator's target RenderNode, remove the animator from
the old target RenderNode that it's currently running on, if any.
Bug: 27141983
Bug: 27145149
Change-Id: I9c9592382d64ecc0390f7ec743a59ce1ad7d9798
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
Also adds logic to clip temporary layers to viewport both for
efficiency and to allow large ones (such as the fallback case) to fit
in max texture size.
Change-Id: Iee51495220f5ca1dc7e6f5fd3615db2e896efd74
Now passes alphas and light radius, and correctly transforms light
center for layers.
Also fixes begin-frame/layer clears to be damage rect aware.
Change-Id: I3b1415cd7bf1518c510145ebebdb745f494a2542
Shares vast majority of clipped savelayer code, with only minor
differences in lifecycle.
Doesn't yet handle fill region, resize, or window transform.
Change-Id: Iabdd71811590d2b937eb11e1b01ce556ade54a5a
clipped SaveLayers will now be pulled to the beginning of the frame,
prior to drawing FBO 0. This will remove the need for switching FBOs
mid-frame.
Change-Id: I4d8dc1f845e84e9b49d5acdf4f4703eef4a9cb06