In another word, create another cached bitmap, when the current VectorDrawable
will look differently when state changed.
Bug: 29870392
Bug: 29854240
Change-Id: I7a5ef91091e547a930368286defc7ab96aeb9471
(cherry picked from commit 4f1acfb5f507798daaff2ff0da47d2b15607ded4)
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
VD tree is ref-counted in both Java and native. VD's child nodes are
entirely owned by the native tree, as VD nodes in native should outlive
its Java counterparts, with one exception: when there's an infinite UI
animator running on VD, the animator may have weak reference to a few
child nodes. In the case of hidden animator running infinitely, the child
nodes would keep getting the animation pulse while the rest of the tree
would have been destroyed. To prevent the setters triggered by animation
from calling into native, we need to check whether the tree is still
valid before going down into JNI.
Bug: 28104172
Change-Id: Ie9d4bf3898c0c23e620a4747624d24b8ab779743
Caches Typeface objects returned from Typeface.createFromAsset function,
Objects are cached in an LruCache with a max size of 16.
Bug: 27251075
Change-Id: I6baae4211a0d0d26422945bf1557b364cfe84b2b
Minikin is changing its approach to table access to use HarfBuzz to
access the tables, based on raw font data, rather than calling the
MinikinFont::GetTable() virtual method. This patch provides raw access
to the font data to make this work.
There's a bit of plumbing to make sure fonts get a pointer to the raw
data as well.
Bug: 27860101
Change-Id: I638e18cf363644bf22fbc9fb9b3358a9e731087f
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
bug:27918183
Fixes an issue where all convex outlines were pushed as empty rects to
RenderNode.
Also adds outline/reveal clip property logging, so such issues are
easier to debug in the future.
Change-Id: Ic4a996ecd09a8ef84cdf8b963bdb4853c7f6d180
Add CSS font-feature-settings URL to get/setFontFeatureSettings method
JavaDoc in both TextView and Paint.
Bug: 27857640
Change-Id: I8c20068801032407d493e4f4a15b89dcf35949d2