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
Previous check .isEmpty() is not sufficient, because getWidth() may have
value 0.5, so technically it is not empty, but when this size is passed
to texture calls it is converted to uint_32 and it becomes zero.
bug:28941093
Change-Id: Ia7c2bf0340466d5376f235fb5da54ad2ddfa0a03
When mutating vector drawables, we need to not only copy over
the VD tree structure, but also the properties of the VD tree,
such as alpha.
Bug: 28974071
Change-Id: I265e7e3cb92455b876cae248bcb9811230cb34f9
Bug: 28667141
saveLayer clips the layer to the size it needs to
be and will translate content if necessary, but
the drawLayerOp that results from that was not
translated to handle the shifted draw content.
This fixes that
Change-Id: I3c9ffd5d0282fa1b958bced94c25e9744281e9be
Interleaving text and shadow rendering resulted in issuing draw commands from FontRenderer::renderDropShadow.
bug: 28528923
Change-Id: Ife2677f58180aaf10ec74d7c6efe5c44fe248daa
Bug: 28519669
This trace tag makes shadows look way more expensive
than they actually are, particularly troublesome
when tracing things with large number of shadows.
Change-Id: Ib6558b1388edd4b006ec15127470cb9ab563f954
There are two parts to VD's native allocation:
1) VD's internal data structure (i.e. groups, paths, etc that make
up of the VD tree). This structure can change, when a VD is used
to load a different drawable resource.
2) Two bitmap caches, not both of which will necessarily be allocated
The size of the bitmap cache depends on canvas matrix and drawable
bounds, and therefore can often change.
We need to count the native allocation from the above against Java heap.
Bug: 26269056
Change-Id: If833aedcf7f3efe00ea73a41ddccb1b48066ffd8
Bug: 27708453
Fixes some issues with camera sources. Previously
it was using GL_TEXTURE_2D target which doesn't
work properly if the source is YUV. It is critical
to ensure GL_TEXTURE_EXTERNAL_OES is used throughout
so the right sampler is used.
Change-Id: I0dcd8941ba08331f24809467b0e828663a38e93b
Fixes: 28218991
If a draw() happens while we are stopped, don't report
that the surface is lost because this will prompt
a tear-down of the surface which isn't desired. It can
result in ViewRootImpl ending up in an internally-bad state
in this case.
Change-Id: If3eb8c6bc8702299e5330bc0917952624dce3b7e
Fixes: 28125010
Restructures 'scene defer', to implement window backdrop overdraw
avoidance in new render pipeline, and disable clipping to content draw
bounds.
Also restructures FrameBuilder's constructors, to separate out into
multiple defer methods.
Change-Id: I53facb904c1a4a4acc493d8a489921a79a50494e
Fixes: 27533462
FrameInfo::duration() will remove time spent waiting
in the queue from the duration. This is desired because
that time is otherwise accounted for by the previous frame,
so we don't want to double count it.
This shows up mostly in TestSceneRunner & shadowgrid2
due to a combination of slow frame times and continous rendering.
Change-Id: I27c42d5c24d266de4ada8ea00ec9164d518754f8
bug:28144676
Calling ClipArea::clipRegion from within ClipArea::clipPathWithTransform
has us handling op-based special casing twice, which caused all clip
paths to appear to be replace ops.
Change-Id: Ib842db53ffed4eee29470f773d59a3a1d07a1a0e