History log of /frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d88c717b4e124e435e54bf1542774aa100773c3e 29-Mar-2017 Diego Perez <diegoperez@google.com> Make layoutlib more lenient with recoverable errors

In many cases, throwing an exception will stop the inflation or
rendering of a layout. Sometimes, we could recover from some of the
failures and render a layout that is "usable".
I've done a first pass trying to follow the following rules:
- Try simple recoveries by choosing sensible defaults. Not trying
complex recoveries.
- Only recover if the exception is not part of the class behaviour.
Avoided removing declared exceptions or exceptions that are expected by
the framework.
- I've kept assertions in place so, in most cases, the behaviour will
be almost identical to the previous one with assertions enabled.

Test: Checked with existing tests
Change-Id: I0001fdd3c808cf405c4eb8d734b9bbe63493e05c
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
434968aa2f7004b21fa598373f59d2928dddf3b3 27-Feb-2017 Jerome Gaillard <jgaillard@google.com> Add stroke width property used by animated vector drawables

This is for example used in displaying a checked radio button.

Test: Modified widget render test to include a checked radio button
Change-Id: I43074ce038f69f28c0cf5fb396d393722b02b142
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
4b0e604090993e88c8206637e5fe26c7b618bfc6 30-Jan-2017 Diego Perez <diegoperez@google.com> Fixes for animated vector drawables

- Make sure that all ImageViews containing animated vector drawables
have the animation started.
- VGroup does not need to copy the children as they are copied by the
VectorDrawable initialization

Test: Covered by existing animated vector drawable tests
Change-Id: Ic0fc09ee5c98b3747dbc6fe311cdeea2c8dba380
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
0c37a9eafb5a925e2d63314c697e4564d68e39b0 01-Feb-2017 Jerome Gaillard <jgaillard@google.com> Update Canvas_Delegate after Change I3edc963a

Test: layoutlib tests
Change-Id: I1f285c3baac267bd47324802c12b33d34f8b581f
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
39bdc174ae51f85ec65983314d4aa18de02758f2 03-Jan-2017 Jerome Gaillard <jgaillard@google.com> Update layoulib following changes in Android source code

This reflects modifications from Id2374bba and I99e1942d.

Test: Run layoutlib tests
Change-Id: I5cd56d8417b997b99be668825d950de661d75818
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
f666c0e2eaceb265069a77c520e84c1a08f08ae4 24-Nov-2016 Jerome Gaillard <jgaillard@google.com> Fix layoutlib to reflect recent changes in platform code

Test: Layoutlib tests
Change-Id: I81964233a9e580ccee9c9e9b0cf3525babf30bd4
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
a10973ebd1ca33c14f0cb06c22ea9d2f9828ac99 11-Nov-2016 Jerome Gaillard <jgaillard@google.com> Rename native methods that were changed in the platform

This is following commits f22859757b, 94931bd87e, 4387190d8e
and caa08ff5e9.

Test: Run TestDelegates
Change-Id: If90028492c036fc5f69913e4dcad5a1a5fca4b55
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
79b070d36b67030ea0b65f3379c047955250fb27 24-Jun-2016 Diego Perez <diegoperez@google.com> More fixes for VectorDrawable memory management

Make the release of all the VGroups deterministic once the root group
has been freed by a finalize call.
Also, free and clear the children array.

Disable assert in DelegateManager that would slow down layoutlib when
there are many delegates and assertions are enabled (dev and canary
builds).

Bug: http://b.android.com/214026
Change-Id: Ic7775d360ae4997f54f30fb75851879acaf8d824
(cherry picked from commit f6d8bba638baedc39d1d8f7bd3c69f4956819c71)
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
d43916b5551ac60d39e505fd02ede2484a1389c7 14-Jun-2016 Diego Perez <diegoperez@google.com> Fix leak in VPathRenderer

The pointer to the root group in the VPathRenderer is not freed anywhere
in the Java side so we need to take care of it on the "native" side.

Change-Id: I2ca60b1f0e975a0b5d29799c5f6f31b5f8d42b9d
(cherry picked from commit ffdb1b241d9458196403c8f16264aa7053487323)
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
a540344b0ac53e999e716206c4860108dddeca7d 27-Jun-2016 Diego Perez <diegoperez@google.com> Merge "Avoid calling deepCopyNodes on null array"
d508639a58b3d73207cee292dd0b5dedefe08f27 27-Jun-2016 Diego Perez <diegoperez@google.com> Merge "Update layoutlib following platform change in VectorDrawable"
db8601fa6af7dc12f9a7b7b2ca589bec3a1f4ff3 13-Jun-2016 Diego Perez <diegoperez@google.com> Avoid calling deepCopyNodes on null array

Bug: http://b.android.com/212694
Change-Id: Ib7e0f62352c1ef6106e62667c9369a9bc69b62cd
(cherry picked from commit 0b4ffd3e9ac1698ed9dfa080515d517b6d971868)
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
cf2000020eca422c5844c6f88629ce118fca4d87 31-May-2016 Jerome Gaillard <jgaillard@google.com> Update layoutlib following platform change in VectorDrawable

Commit 028029730b copies tree properties when mutating a vector
drawable. Layoutlib does the same.

Bug: 28974071
Change-Id: I5075b35e517df4ce32a91e2926d9caa02a0c2606
(cherry picked from commit 5ee73b3466090828acdc87fffd95247b6ace6440)
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
301d468428ba87a11f137dab29954f9fed61d704 26-May-2016 Jerome Gaillard <jgaillard@google.com> Incorporate alpha attribute when painting VectorDrawable

When painting a vector drawable, alpha transparency can come from
the path color, or from the overall android:alpha attribute.
Include both when drawing.

Bug: http://b.android.com/206667
Change-Id: Id946fdeaf72b981597787f5357ef3a90a471c584
(cherry picked from commit 8cae3b0ce6f527e7b90d46755ffaf6d3d4d65114)
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
5ca21e4ceca42be633031809b8ee43fd8688389b 10-May-2016 Diego Perez <diegoperez@google.com> Fix VectorDrawable_Delegate and DrawerLayout

Modify the nDraw call that has been changed in the framework to return
an int with the number of pixels allocated.
Modify the animation initialization render call to use the actual
measured size (instead of 0,0) so the DrawerLayout is setup
correctly.

Change-Id: I198de05206382c6489056f7c3d9a1d328864321c
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
8c0ab16494f3a46ee847d035de2248fae3168d8a 13-Apr-2016 Jerome Gaillard <jgaillard@google.com> Change method name in VectorDrawable_Delegate

Following change in VectorDrawable from commit cdedc9a80d.

Change-Id: I5d17b2e77c9600fe3da981c77a3e39dcd4df1d1f
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
5ceb30f2164c745789c13bd0060e57fa8c04a8fd 22-Mar-2016 Diego Perez <diegoperez@google.com> Add fill type support to vector drawable

The platform has added fill type to vector drawables. This CL implements
the native replacement.
Also remove a couple of delegates for classes that have been removed
from the platform.

Change-Id: Ie6ba344db9c9c2c45cd0ef4b99f11f9d8bcfd7de
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
39b205cc92bfc84e6eee5c7c4713ee9ab5bb645e 07-Mar-2016 Diego Perez <diegoperez@google.com> Add missing references to VNativeObject

Change-Id: I2db4ad94009c0daff4649da6f85e5c084f4c01ea
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
5b5b1c0c5debd7a90c086f36cbafa688c857a673 07-Mar-2016 Xavier Ducrohet <xav@google.com> Merge "Animated vector drawable support" into nyc-dev
566b303365078fac9a454f1595add19e02631db3 01-Mar-2016 Diego Perez <diegoperez@google.com> Add support for GradientColor in layoutlib

Change-Id: Ia9a55a9e00d7ddb5263f3dbe46b5da8dde457526
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
1b338cda4ed044691f0fe8ba59950bfc309d911d 03-Mar-2016 Diego Perez <diegoperez@google.com> Add missing translate if the drawable top is not 0,0

If the vector drawable coordinates are not 0,0 we need to translate the
canvas to that position.

Change-Id: I3a829c427ec98061da3295e3cba8655f693d390c
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
8a9a824cd5641d214906a20a2a9372e62e9f3fb8 03-Mar-2016 Diego Perez <diegoperez@google.com> Animated vector drawable support

Change-Id: Iefd41d95503bb4f3b26020a519636a63d3da799b
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java
5d1013cf13e59b7f8dc8f16b5811cb29982e0ef3 23-Feb-2016 Diego Perez <diegoperez@google.com> Implement native methods in VectorDrawable

Most of the VectorDrawable implementation has been moved to native code.
This CL implements most of the required functionality that existed in
Marshmallow.

Change-Id: I009bcd5c166f2bfa0795d2718fabab4a549eba9f
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java