2391 Commits

Author SHA1 Message Date
Alan Viverette
5bc5d7c45f Merge "Propagate original Resources to DrawableContainer if no override set" 2015-02-26 20:53:39 +00:00
Alan Viverette
102a6bff77 Propagate original Resources to DrawableContainer if no override set
Also fixes a double-add in ASLD.

Bug: 19498949
Change-Id: I9e7e0a0fb22a23518c80c1b099f8da0e0c1f53d8
2015-02-26 12:52:47 -08:00
Alan Viverette
70e68e0ff1 Set AnimationDrawable running to false unless animation is scheduled
Also cleans up java docs and clarifies functionality of nextFrame().

Bug: 19500067
Change-Id: I8c274c6f4df7ee17d28ae151009f07a420c9ab1a
2015-02-26 10:50:55 -08:00
Alan Viverette
40d13f260c Merge "Remove obsolete code from AnimatedRotateDrawable state" 2015-02-26 01:56:14 +00:00
Alan Viverette
039bd51a23 Remove obsolete code from AnimatedRotateDrawable state
DrawableWrappers shouldn't have drawables inside their state, nor should
they manage their own drawables. Also cleans up documentation.

Bug: 19518051
Change-Id: I2aea011afe80e94aadec702e1680c3765528b112
2015-02-25 17:55:22 -08:00
Alan Viverette
a6d4484218 Merge "Create blank state in no-arg RotateDrawable constructor" 2015-02-25 19:15:40 +00:00
Alan Viverette
f74869698a Create blank state in no-arg RotateDrawable constructor
Also removes unnecessary constructor in InsetState so that it matches
the other DrawableWrapper classes.

Bug: 19489698
Change-Id: Ib2e510c6ae90858774970d928e541a9b08cb714a
2015-02-25 11:12:55 -08:00
Alan Viverette
32adbd3524 Merge "Always apply color filter passed to DrawableContainer.setColorFilter" 2015-02-24 01:22:17 +00:00
Alan Viverette
6f51440a74 Always apply color filter passed to DrawableContainer.setColorFilter
Bug: 19461256
Change-Id: Id44d276739b868e504139cdf767992039f3e4336
2015-02-23 17:21:24 -08:00
Alan Viverette
6a8253fdc9 Update progress bar and seek bar backgrounds, fix seek bar thumb
Ensures LayerDrawable copies out the correct layer properties during
"tileification". This really needs to be deprecated or replaced in a
future CL, though, because it is potentially lossy (e.g. for
RippleDrawable, which is an instanceof LayerDrawable).

Bug: 19448441
Change-Id: I483e9c34fd781e280c13eb5951f96bc71a252819
2015-02-23 12:49:47 -08:00
Alan Viverette
b3f3762ee0 Merge "Unify wrapper-type drawables" 2015-02-23 20:39:01 +00:00
Elliott Hughes
65bc1f5214 am 031a9b13: am 92c4f175: am d002e027: Merge "Fix \'fuchsia\' typo."
* commit '031a9b13197f6ab1ff83ccdafd890351b70bb63c':
  Fix 'fuchsia' typo.
2015-02-21 17:24:33 +00:00
Elliott Hughes
92c4f1756d am d002e027: Merge "Fix \'fuchsia\' typo."
* commit 'd002e02750b51fed3da41a2b4b222824df8d1a10':
  Fix 'fuchsia' typo.
2015-02-21 17:09:46 +00:00
Elliott Hughes
fd9bc7bb36 Fix 'fuchsia' typo.
Bug: https://code.google.com/p/android/issues/detail?id=152142
Change-Id: Ib45f2d19d52fe9d95d560d37296d50cba190cb83
2015-02-21 09:03:13 -08:00
Alan Viverette
a129622071 Unify wrapper-type drawables
Fixes several issues with constant state and propagation of drawable
property changes to wrapped drawables. Also un-hides the layout
direction accessors and hotspot getter.

Change-Id: Iff19db6a95059cbcfcbde7af0ac33871ccd41615
2015-02-20 15:00:25 -08:00
Alan Viverette
72710f11ec Use ObjectAnimator for fading scrollbars, set initial duration to 1500
Fairly intensive refactoring of ScrollabilityCache.

Change-Id: I88669c0b9b79ca12a237606d5ff8be0e7e8b37ba
2015-02-20 11:10:22 -08:00
Alan Viverette
88d44d4ada Add attribute for controlling ripple radius
Sets up the action bar item and control styles to use a 20dp radius
ripple to match latest Material spec.

Bug: 19370157
Change-Id: I87cba01076ee83937a6bfd36fc7dc188e1eb4672
2015-02-13 11:11:12 -08:00
Alan Viverette
d8c18e81c0 API for adding layers to LayerDrawable
Change-Id: I859c956a47d95fa1ce65b9eea9bc7be4659486bf
2015-02-12 18:49:42 +00:00
Alan Viverette
a756fd9af6 Prevent temp rect reuse across methods in LayerDrawable
Drawable invalidation may call back into methods that are relying on
the same temp rect objects, which mangles the values.

Bug: 19321598
Change-Id: If8aa434cf85c81d22b5d580e258926087248cd93
2015-02-10 16:39:46 -08:00
Alan Viverette
7354b30d90 Add layer width, height, gravity, and RTL insets for LayerDrawable
Bug: 18473819
Change-Id: Iae8e3dbd3fcc7f4c2f08b266c69d40036e75dfb6
2015-02-03 13:24:59 -08:00
Alan Viverette
e300553a01 Merge "Ensure InsetDrawable propagates state and callback on set drawable" 2015-02-02 18:01:04 +00:00
Alan Viverette
bc43ac2094 Ensure InsetDrawable propagates state and callback on set drawable
Bug: 19230432
Change-Id: I161e377c5a50fd68718a36cef0038ab06e74c90d
2015-02-02 09:56:49 -08:00
Alan Viverette
7d6854a229 Synchronize mutated constant state's drawable constant state
Mutating InsetDrawable's locally-held drawable alters its constant state,
so we need to update the InsetDrawable's reference to match. This ensures
that any drawables created using getConstantState().newDrawable() will
match the mutated versions.

Bug: 19213175
Change-Id: If9063bcc0942691a8940443e607f2dc722fc6e13
2015-01-30 16:19:45 -08:00
Derek Sollenberger
1db141f93c Create proxy between Skia's SkCanvas and the framework Canvas.
This enables Picture.java to be replayed into HWUI in addition
to extending the Skia testing suite to HWUI.

Bug: 19011232
Change-Id: Id27ac03eec817b0784763e62ab8413a07b3b8cb2
2015-01-30 12:56:37 -05:00
Leon Scroggins III
9bf106f156 Merge "Move SkAvoidXferMode into frameworks/base." 2015-01-30 13:55:23 +00:00
Leon Scroggins III
626647c3f6 Move SkAvoidXferMode into frameworks/base.
We are removing it from Skia, so we need it here to support Android.

Add some small cleanups (remove comment that doesn't apply, convert
SK_OVERRIDE to override, remove 'virtual' keyword from methods with
'override' on them).

BUG:skbug.com/3329
Change-Id: I1f883082d6fb9d49b9c9ba9e1f50bd713eabf915
2015-01-30 08:32:49 -05:00
Alan Viverette
f0f7f8ceb5 Move drawable out of inset state, only store constant state
This ensures that InsetDrawable's constant state only references other
constant states rather than holding an entire Drawable, which provides
a clean separation between local and constant state information. This
ensures that calls to mutate() can create a new constant state without
losing local drawable state and that newDrawable() still relies on
the same constant state.

Bug: 19156549
Bug: 13877782
Change-Id: I48146f6c7ac3593009cfa323fc341bcd7d8ab21b
2015-01-27 12:07:33 -08:00
John Reck
fe026218d0 am 94474515: Merge "Prevent memory corruption from use-after-free" into lmp-mr1-dev automerge: bb8d7ff
automerge: 1e5dd46

* commit '1e5dd46133bd47445ba0657692fb86492acad705':
  Prevent memory corruption from use-after-free
2015-01-23 20:37:27 +00:00
John Reck
1e5dd46133 am 94474515: Merge "Prevent memory corruption from use-after-free" into lmp-mr1-dev
automerge: bb8d7ff

* commit 'bb8d7ffeae187e8782a9494e252e335db537b2a1':
  Prevent memory corruption from use-after-free
2015-01-23 20:33:18 +00:00
John Reck
4018eb3763 Prevent memory corruption from use-after-free
Bug: 19035637

If an app tries to call recycle() on a Bitmap that has
already been finalized it will result in use-after-frees. This is
bad. Avoid this by setting the pointer to 0 and checking for this

Change-Id: I12d73703a0f95b05fe4c2fd8e9c01b6a3f2f023b
2015-01-23 11:01:05 -08:00
Alan Viverette
8ac90a0609 Avoid ripple buffer creation for empty bounds automerge: b74155c automerge: e6e216c
automerge: 2aacb86

* commit '2aacb861f4c7b80c5d2bb22956c9a5d4ace4df67':
  Avoid ripple buffer creation for empty bounds
2015-01-21 21:13:33 +00:00
Alan Viverette
2aacb861f4 Avoid ripple buffer creation for empty bounds automerge: b74155c
automerge: e6e216c

* commit 'e6e216c48ea25bdbc2d0a262c74670fb6513e42b':
  Avoid ripple buffer creation for empty bounds
2015-01-21 21:09:39 +00:00
Alan Viverette
b74155cf01 Avoid ripple buffer creation for empty bounds
Bug: 19068439
Change-Id: I031d4303bbf101a25612dce6f02d81ce4cf58e2b
2015-01-21 12:30:49 -08:00
ztenghui
a0d17f8090 Merge "Update the javadoc for the clip path fix." 2015-01-20 22:08:46 +00:00
Alan Viverette
d2052175eb am c83245be: am 628e646e: am aa229902: Merge "Jump ripples to end when switching to a non-hardware canvas" into lmp-mr1-dev
* commit 'c83245be678608533ce53005f4149719f6dd5e03':
  Jump ripples to end when switching to a non-hardware canvas
2015-01-15 04:57:39 +00:00
Alan Viverette
c83245be67 am 628e646e: am aa229902: Merge "Jump ripples to end when switching to a non-hardware canvas" into lmp-mr1-dev
* commit '628e646eeae6147578428632d7c25326b8b7ef59':
  Jump ripples to end when switching to a non-hardware canvas
2015-01-15 01:39:44 +00:00
Alan Viverette
a0c0ca7389 Jump ripples to end when switching to a non-hardware canvas
Previously we canceled the hardware animations but neglected to reset
the state, which left us drawing in the pressed state.

Bug: 19020524
Change-Id: I439a18126b9093cac40006361be99f8d077b95a9
2015-01-14 17:05:21 -08:00
ztenghui
6fbcefe4d7 Update the javadoc for the clip path fix.
b/18758765

Change-Id: I1845c09a120ecdf0d7685ff1f6165b1e841db5ce
2015-01-14 14:40:58 -08:00
ztenghui
5a880611cc Merge "Limit the scope of clip path to the group, not global" 2015-01-09 23:16:23 +00:00
ztenghui
054a17caaa Limit the scope of clip path to the group, not global
http://b/18758765

Change-Id: I899401a5fcbccd0421687bd5cf671f7751092195
2015-01-09 14:53:47 -08:00
Derek Sollenberger
304cc53874 Use the generic Canvas instead of SkCanvas
bug: 18642206
Change-Id: I0dc3f6b620083e5948c2d4be541ae7c6261b3482
2015-01-09 09:16:06 -05:00
Alan Viverette
5dc973cb03 Use text ascent / descent to center SimpleMonthView labels
Also updates Canvas.drawText() docs to clarify that the y-origin is
actually the baseline rather than the top (which is what developers
expect).

BUG: 18864682
Change-Id: Ibfa2a79327d17b5135f90468195fbeca922a25c8
2015-01-08 11:12:39 -08:00
Alan Viverette
f4c068b72e Add getDither, getFilterBitmap to Drawable for CTS testing
Also removes unnecessary overrides from PictureDrawable.

Change-Id: I13539b5204e8c0d8b9912da14de7ceae62720e3f
2015-01-06 11:01:36 -08:00
Alan Viverette
304ea5aac7 Merge "Allow use of theme attributes in color state lists" 2015-01-06 18:47:29 +00:00
Tom Hudson
8dfaa49042 Make DisplayListRenderer inherit from Canvas, merge JNI
Incrementally unify the upper layers for Skia and HWUI.
Remove redundant code from GLES20Canvas.java; instead
use inherited mNativeCanvasWrapper and superclass method
definitions.

Moves some unrelated SkPaint utility functions from Renderer
to new utils/PaintUtils.

bug: 15672762
Change-Id: I4ddd4214b8e9eeb95289d054ef423f2542bb5fa5
2015-01-05 15:25:41 -08:00
Alan Viverette
45c4bbbbce Allow use of theme attributes in color state lists
BUG: 17384842
Change-Id: Ibdc413acbd00e37b908432abd55f6521c22b8fc9
2015-01-05 14:59:19 -08:00
Alan Viverette
5a4be5a2da am e260a358: am 7c3212b2: Merge "Propagate DrawableContainer state on mutate, fix ColorDrawable theming" into lmp-mr1-dev
automerge: 81612d8

* commit '81612d80c5b2d40c8cf1fb03336a9b0f9249d82a':
  Propagate DrawableContainer state on mutate, fix ColorDrawable theming
2014-12-12 22:15:39 +00:00
Alan Viverette
0a69ae9666 am 1060d75e: am 9a1b4c29: Merge "Move ripple to end state on jump when hardware exit is pending" into lmp-mr1-dev
automerge: 2e0e2a4

* commit '2e0e2a44073e7417a42d97e9d7b82e050a845b4d':
  Move ripple to end state on jump when hardware exit is pending
2014-12-12 22:14:20 +00:00
Alan Viverette
81612d80c5 am e260a358: am 7c3212b2: Merge "Propagate DrawableContainer state on mutate, fix ColorDrawable theming" into lmp-mr1-dev
* commit 'e260a358bfc945bf01d901f496b7f30784cbf920':
  Propagate DrawableContainer state on mutate, fix ColorDrawable theming
2014-12-12 22:11:46 +00:00
Alan Viverette
2e0e2a4407 am 1060d75e: am 9a1b4c29: Merge "Move ripple to end state on jump when hardware exit is pending" into lmp-mr1-dev
* commit '1060d75e3abd37671b0962297f4587dd3d6e0cc8':
  Move ripple to end state on jump when hardware exit is pending
2014-12-12 22:11:40 +00:00