OSDN Git Service

Use intrinsic size for path animation in AnimatedVectorDrawable
authorGeorge Mount <mount@google.com>
Mon, 8 Sep 2014 20:23:36 +0000 (13:23 -0700)
committerGeorge Mount <mount@google.com>
Wed, 10 Sep 2014 00:09:57 +0000 (17:09 -0700)
commitfd3c4744f265c5277e6e2641a18d5ec3dff19f6b
tree3f3bb4110817cdee515cc134afb9258eb223ed5d
parent8232d822aa97e78e982ed154ac618cde34baac2a
Use intrinsic size for path animation in AnimatedVectorDrawable

Bug 16984007

Animated Vector Drawables were using the viewport dimensions for
calculating the allowable animation error. Instead of using viewport
dimensions, it is better to use the intrinsic dimensions. Using
the viewport dimensions meant that a small viewport (e.g. 1x1)
would mean that animation paths within would only have an accuracy
of 50% of the dimensions of the drawable.

Change-Id: Id0152eabb4effd1e50c644eea7a371b38baeb7c1
core/java/android/animation/AnimatorInflater.java
core/java/android/animation/KeyframeSet.java
graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
graphics/java/android/graphics/drawable/VectorDrawable.java