Bug: 30342017
Upload recents thumbnails in the
dead gaps between frames instead of
at the start of a frame. This eliminates
jank caused by the large texture
upload.
Change-Id: I507cd286d199109c7a9a1511d68ba5ab5d28069f
This CL fixes an issue where one of the constructors creates a
native tree object without registering the allocation of its
root group with the NativeAllocationRegistry.
BUG: 28943866
Change-Id: Ic8db3f2fa8036dfabdbc1a1fcbd58d08a0379e2d
In another word, create another cached bitmap, when the current VectorDrawable
will look differently when state changed.
b/29870392
Change-Id: I7a5ef91091e547a930368286defc7ab96aeb9471
AVD will fall back to UI thread animation if the host view is
rendering onto a SW layer.
BUG: 27617346
Change-Id: I5b644529048a0c30aada3abf2f4e95e40760936d
Previously, wrong valueType error is swallowed in jni. As a result,
some animations are quietly skipped without letting developers know.
This CL maintains that behavior for pre-N, and throws Exception
to notify developers of the error for N and above.
Bug: 29009391
Change-Id: I3e8f003cdb97d214da72af3f93a84f64797b1c2c
(cherry picked from commit 94db09917a17976135e2c63d8e4171c54730c079)
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
Previously, the VectorDrawable animators modify the VD properties by
doing reflection based on the property name. This CL avoids the overhead
of calling reflection by wrapping the setters of VD objects in
Float/IntProperty.
Bug: 28124049
Change-Id: I562c8d749fdfe508564c82a700a92e835cdd9ff4
(cherry picked from commit 9f3b31b9530a2121b4557fc312972c4faa133d5e)
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
Collect child invalidations during layer bounds change, then dispatch a
single invalidation if any children requested invalidation. This prevents
re-entrance from, for example, a LayerDrawable.updateLayerBounds() call
invoking setBounds() on a child, which necessarily calls invalidateSelf()
and immediately propagates up to ImageView.invalidateDrawable(), which
then calls configureBounds() and puts us back in updateLayerBounds().
Bug: 28636072
Change-Id: I36c9eefc18904d493292d51b37e4b05cfddcf794
Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.
Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
This hopefully handles the remaining finalizers in frameworks/base
that didn't guard against calls from other finalizers after being
finalized.
The goal here is to reduce the possible corruption causes we have
to think about by a few.
If any of theses are either very frequently used, or use large
Java (as opposed to native) objects, we should probably convert them
to NativeAllocationRegistry instead. But that's more work.
Bug: 18178237
Change-Id: I79bc0e8fa20af8f340418a6226022e0294d77f02
(cherry picked from commit ad3cc3c63c6d0f637d2ece3935b5b01b19473299)
So that the native library isn't unloaded before we have a chance to
call the freeFunction.
Bug: 28406866
Change-Id: I889f1ccd91bba70e31fb8d09c0ec6d471fc35841
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: 28428970
Test for video sources and fix a bug where
we should throw an IAE for surfaces that are invalid
at request time.
Change-Id: I891a2b1568f583300433c7aca6de36d2e2621c63
- Or to be specific, SurfaceFlinger can’t easily take 565 screenshots,
so convert them when creating the ashmem bitmap.
Bug: 28151300
Change-Id: Ic7586659a41cc19c322136f77a1c52ef68c22707