History log of /frameworks/base/libs/hwui/VectorDrawable.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cc29a5dde1ef0a3cf0fcec10eb9d37d9e8fa3afb 15-Mar-2017 Stan Iliev <stani@google.com> Modify VectorDrawable to scale path through canvas matrix

Apply the path matrix to the canvas instead of creating a new path.
Delete logic that scales the stroke, because this is done through
the matrix as well. Merge/delete some functions.

Bug: 36392701
Test: CTS graphics tests pass with minor changes in 6 golden images.
Quick settings and settings app drawables are OK. Vector icon app
draws identical paths.
Change-Id: If623bc0a535fad95a2839f79bd997c016bcd9d4d
/frameworks/base/libs/hwui/VectorDrawable.h
037fc1815b0f69b0b24e68e16281b490bdeb1d56 16-Nov-2016 Teng-Hui Zhu <ztenghui@google.com> Recreate the bitmap cache when it is smaller than needed

fix:32780212

Test: Existing CTS and attached repro apk.

Change-Id: Ib908319af6539b2438b850f7a50d5a539cef8368
/frameworks/base/libs/hwui/VectorDrawable.h
fc9999505a36c66892d7ccce85187936105f4f36 17-Oct-2016 sergeyv <sergeyv@google.com> Pass Bitmap instead of SkBitmap for bitmap rect operation
Test: refactoring cl.
bug:32216791

Change-Id: I66d19194c57b3aa2c400aa87acffc774a533776a
/frameworks/base/libs/hwui/VectorDrawable.h
25c9f6cede5705406294a5043363952c316facb2 01-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in libs/hwui." am: 7207562ff7 am: d7a69e04eb am: 842f1e48e7
am: 1f50f80aab

Change-Id: I713bd07fee150cc684e630045e02872b23062a5a
1f50f80aab31600406c7b93a1630d396228983f0 31-Aug-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in libs/hwui." am: 7207562ff7 am: d7a69e04eb
am: 842f1e48e7

Change-Id: I401bb7ef3a46bb317ba664667fab4a16c129e5aa
a619ec70cf765d9166f0862e74653711b87307b3 29-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in libs/hwui.

* Add explicit keyword to conversion constructors,
or add NOLINT for implicit converters.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Id8ca42433a4fc3652e4cb13787c4cb169f20d9a9
/frameworks/base/libs/hwui/VectorDrawable.h
2c02aa1e02b636b5c8da9735194638331e32dd7c 29-Jul-2016 Doris Liu <tianliu@google.com> Run animation *after* property sync am: 7c7052dd9b am: 0053b066e5
am: c82ef8a51f

Change-Id: I06962e8d068b3d005b4cd4ce38a4028abab3333b
7c7052dd9bbfb2d98112975f7cbd2655212bf85b 26-Jul-2016 Doris Liu <tianliu@google.com> Run animation *after* property sync

VectorDrawable contains properties that can be mofidied from both
UI thread and RenderThread. The two sets of properties are synced
during prepareTree. Previously VD animations ran before prepareTree,
as a result, during prepareTree the property sync overwrote some
of the animatable properties. In other words, the first frame of
the animation wasn't correct. An example is in battery saver mode
when the animation only has one frame to animate (0-duration), the
end result looked wrong.

This CL moves the VD animation to after prepareTree to solve the
problem mentioned above. Meanwhile, in order to signal which
VD will be animated so as to have them properly damaged, all VDs
with running animators are marked dirty.

Bug: 30226711
Change-Id: I831dae9abb2908876c935b9be4c11dfd09452d5c
/frameworks/base/libs/hwui/VectorDrawable.h
718cd3eb70703c43f29ca37907bbf0e153d8cca0 18-May-2016 Doris Liu <tianliu@google.com> Handle hidden RT VectorDrawable animators

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
/frameworks/base/libs/hwui/VectorDrawable.h
028029730bf2d177f84316d2d444d409eba4b6cb 27-May-2016 Doris Liu <tianliu@google.com> Copy native tree's property when mutate vector drawable

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
/frameworks/base/libs/hwui/VectorDrawable.h
335d7d174464ea3fc2d058dcff6e436df1cf0fd9 27-May-2016 Doris Liu <tianliu@google.com> Copy native tree's property when mutate vector drawable

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: If793f5f2b6e116472a1c6da0fb60d8278a78b03f
/frameworks/base/libs/hwui/VectorDrawable.h
67ce99b66ebc816ae8bbc222db8f3695fb15495b 18-May-2016 Doris Liu <tianliu@google.com> Handle hidden RT VectorDrawable animators

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: Id4b3b37f28274c917cb9beb9dcd3d1e6991b5c5d
/frameworks/base/libs/hwui/VectorDrawable.h
a7a6be1085c8ed62f20749559ea8510b81a012cb 11-May-2016 Tenghui Zhu <ztenghui@google.com> Merge "Turn off some path drawing logs by default"
f8d131cc8dc4ef675b8f8fc57dcc26062d575d32 30-Apr-2016 Doris Liu <tianliu@google.com> Count native allocation for VD against Java heap

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
/frameworks/base/libs/hwui/VectorDrawable.h
85d99528b23b5575d97f614fe25f839d19740abc 25-Apr-2016 Teng-Hui Zhu <ztenghui@google.com> Turn off some path drawing logs by default

Originally the logs are added to track potential performance bug.
Like unexpectedly deep recursion loop.
However so far, we haven't captured anything by these logs.
And they are causing some misunderstanding in some bugs.
So I think it is better to disable it by default.

In the future, we will consider switching to direct Skia arcTo support
and drop this part.

Change-Id: Iff6df7a92e40b4775a644a1497e113de0eedbc8a
/frameworks/base/libs/hwui/VectorDrawable.h
da62de4f65ccffc4734299f82f1c9ce4836e1c58 15-Apr-2016 Doris Liu <tianliu@google.com> Merge "Fix ref count of fillGradient and strokeGradient" into nyc-dev
ad21fe27627c8f4a1de886a2d1c5296694dc3501 15-Apr-2016 Doris Liu <tianliu@google.com> Fix ref count of fillGradient and strokeGradient

Bug: 28086621
Change-Id: Ibb52bdfb20904f0ad102878fbb33d3679bb5132d
/frameworks/base/libs/hwui/VectorDrawable.h
32d7cda0b89a114171f14de0753674090b3d75fc 08-Apr-2016 Doris Liu <tianliu@google.com> Fix translationY not being set correctly for VD during animation

Bug: 28056917
Change-Id: Ic5b7d14ac3dff8cad1c62f08b6d3389f979a2b00
/frameworks/base/libs/hwui/VectorDrawable.h
1d8e194661085f9a18ab1b3cd12f9e19d3a86be5 03-Mar-2016 Doris Liu <tianliu@google.com> Make AVD thread safe

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
/frameworks/base/libs/hwui/VectorDrawable.h
dccca44ffda4836b56a21da95a046c9708ffd49c 21-Mar-2016 sergeyv <sergeyv@google.com> Reland: Move text logic from jni to hwui level

Initial CL: https://googleplex-android-review.git.corp.google.com/#/c/886854/

Change-Id: I9dfd85fe1d2a2c44f4360c8a29fd58d80e6f31c8
/frameworks/base/libs/hwui/VectorDrawable.h
afbd0f1fef46ef0ddf633dfde0de724db3da1405 21-Mar-2016 Sergei Vasilinetc <sergeyv@google.com> Revert "Move text logic from jni to hwui level"

This reverts commit a7f6bba1a3565c19715e878dfe7f0e01022944ff.

Change-Id: If4f36f87a85411b6128fd92d391313803ccaf9dd
/frameworks/base/libs/hwui/VectorDrawable.h
a7f6bba1a3565c19715e878dfe7f0e01022944ff 16-Mar-2016 sergeyv <sergeyv@google.com> Move text logic from jni to hwui level

bug:25865834
Change-Id: I2d8c9c9544afcb5ce1784f732aed3e54e0eda372
/frameworks/base/libs/hwui/VectorDrawable.h
46591f4a2dbd785bcae2b82bb490e78208605ec8 15-Mar-2016 Teng-Hui Zhu <ztenghui@google.com> Add fillType support to VectorDrawable

Default as non-zero, which is the same as SVG.
b/27533958

Change-Id: Id20e6d3493bb4d2b4b65d7f6cdb13586631c40e4
/frameworks/base/libs/hwui/VectorDrawable.h
ef062ebd20032efe697741d6c3dfd1faec54f590 05-Feb-2016 Doris Liu <tianliu@google.com> Ref count the nodes in VectorDrawable

Also added API check so that for pre-N we ignore invalid VD animation,
in order to avoid breaking old apps.

Bug: 26975469
Bug: 26949340
Change-Id: I498539ad6a05de3d886e7dcdc8a167e78333ab11
/frameworks/base/libs/hwui/VectorDrawable.h
766431aa57c16ece8842287a92b2e7208e3b8ac3 04-Feb-2016 Doris Liu <tianliu@google.com> Revert "Revert "VectorDrawable native rendering - Step 4 of MANY""

This reverts commit 5a11e8d0ba21624025b89ac63bbd18befa55be0e.

Change-Id: I7a48b59c4f930dad65ddc8590c25a12636244ea2
/frameworks/base/libs/hwui/VectorDrawable.h
5a11e8d0ba21624025b89ac63bbd18befa55be0e 04-Feb-2016 Doris Liu <tianliu@google.com> Revert "VectorDrawable native rendering - Step 4 of MANY"

b/26949340 and b/26975469, b/26975079 as well

This reverts commit f276acd98457bcaabc9e79a17a736b3b484f005e.

Change-Id: I4b55177daf0d289bc03604c71fd4bf579f65073a
/frameworks/base/libs/hwui/VectorDrawable.h
f276acd98457bcaabc9e79a17a736b3b484f005e 07-Jan-2016 Doris Liu <tianliu@google.com> VectorDrawable native rendering - Step 4 of MANY

This CL runs VectorDrawable animation on RenderThread. The changes in this CL
include:
- Convert all the animators in AnimatorSet for AVD into a set of RenderNodeAnimators.
- Hook up the new animators with RenderThread
- Add drawOp in RecordingCanvas for drawing VD so that during the animation
on RenderThread, all the property changes on VD can be reflected on the screen.

TODO:
- Implement reverse and reset for AVD.

Change-Id: I2df1d754f2db0ad098d9c15dde4bb2bdfafc2315
/frameworks/base/libs/hwui/VectorDrawable.h
dbee9bb342cdfaa5155b1918f90262c05e2464cb 15-Dec-2015 Teng-Hui Zhu <ztenghui@google.com> Gradient for VectorDrawable's fill and stroke

Add ComplexColor interface for both GradientColor and ColorStateList.
Set up constant state, factory, theme attrs for GradientColor, while
refactoring the ColorStateList's similar code. (Functionality in CSL should
be the same).

Support themeing in both the root and item level in GradientColor.
For example, both startColor in <gradient> tag or color in <item> tag can
have theme color.
Add tests for both simple and complex cases with themeing etc.

Hook up the native VectorDrawable implementation using 2 extra JNI calls for
simplicity. Such calls only happen at inflate and applyTheme call.

b/22564318

Change-Id: Ibdc564ddb4a7ee0133c6141c4784782f0c93ce0e
/frameworks/base/libs/hwui/VectorDrawable.h
c2de46fadd4ca9c6aa2d9dd7a65b161b28fc6f3b 21-Jan-2016 Doris Liu <tianliu@google.com> Create SkCanvas on the stack to avoid leaking memeory

Bug: 26447978
Change-Id: Ied022c103c3b08e9cfc3cb775a8c95fd5461e81d
/frameworks/base/libs/hwui/VectorDrawable.h
4bbc2931263b232fba61807fca00e127573eff42 02-Dec-2015 Doris Liu <tianliu@google.com> VectorDrawable native rendering - Step 3 of MANY

- Refactored VPathRenderer & VectorDrawableState
- Moved all the VD rendering into native
- Set up hooks for VD's property changes in JNI for animated VD

TODO: JNI calls can be further reduced when we convert the animation
in AVD to use RenderNodeAnimator, in which case animation will be
driven from native and therefore most of the JNI hooks for changing
VD's properties during animation will no longer be needed.

Change-Id: I52021f4d7bea057b83ace54085d870dd45acae0f
/frameworks/base/libs/hwui/VectorDrawable.h