2431 Commits

Author SHA1 Message Date
Alan Viverette
6f351bcc7c am 2776b173: am 204e9f4c: am 2f82e48a: Merge "Always project ripples" into lmp-mr1-dev
* commit '2776b17327e99338630db96d68170b0327084b3d':
  Always project ripples
2014-10-13 21:12:43 +00:00
Alan Viverette
2776b17327 am 204e9f4c: am 2f82e48a: Merge "Always project ripples" into lmp-mr1-dev
* commit '204e9f4cae2d49348c121c9738f8f33b5cb20b27':
  Always project ripples
2014-10-13 21:07:55 +00:00
Alan Viverette
2f82e48abb Merge "Always project ripples" into lmp-mr1-dev 2014-10-13 20:58:48 +00:00
Marcin Kosiba
b2b7c6ebe4 Make Paint.mNativePaint package protected to fix the build.
The Paint_Delegate changes from lmp-dev reference mNativePaint, which
has been made private in master. Change it to being package-protected
to fix the build.

Change-Id: I4bf30a530f0145cf7697cef6aa9a698fc9bab4ed
2014-10-13 10:32:46 +01:00
Alan Viverette
961dc4c2f1 am bb3fad78: am 8cb9a9e6: am 284559bf: Merge "Fix inset drawable\'s intrinsic size, replace ic_text_dot asset" into lmp-mr1-dev
* commit 'bb3fad78c922f5da9ecafcd0389a552b2a84ce94':
  Fix inset drawable's intrinsic size, replace ic_text_dot asset
2014-10-11 00:26:58 +00:00
Alan Viverette
bb3fad78c9 am 8cb9a9e6: am 284559bf: Merge "Fix inset drawable\'s intrinsic size, replace ic_text_dot asset" into lmp-mr1-dev
* commit '8cb9a9e6ba602cc4a2da334fcec966e7f06c63a4':
  Fix inset drawable's intrinsic size, replace ic_text_dot asset
2014-10-11 00:22:41 +00:00
Alan Viverette
cdd5e067f2 Fix inset drawable's intrinsic size, replace ic_text_dot asset
BUG: 17648301
Change-Id: I8af0f6d1beee7a1cb3a3b9db571ed2c407e24556
2014-10-10 14:08:32 -07:00
Dianne Hackborn
d95f1c991c am 75a6e82b: am 36ae48a8: am d83e9e42: am 0761b1b5: am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '75a6e82bcc625025c5f48dc6c33d0dd469e9ca61':
  Put in real "code" (aka marketing) name.
2014-10-10 05:41:19 +00:00
Dianne Hackborn
75a6e82bcc am 36ae48a8: am d83e9e42: am 0761b1b5: am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '36ae48a850bade17d485cb49dd40a3f11f667ad4':
  Put in real "code" (aka marketing) name.
2014-10-10 04:26:40 +00:00
Alan Viverette
ccefe6eea6 am 3ad81eee: am 2eda6f07: am 466f5581: Merge "Slow down ripple background fade in from press" into lmp-mr1-dev
* commit '3ad81eee7202317220599454bf550a755516a449':
  Slow down ripple background fade in from press
2014-10-09 22:31:26 +00:00
Alan Viverette
3ad81eee72 am 2eda6f07: am 466f5581: Merge "Slow down ripple background fade in from press" into lmp-mr1-dev
* commit '2eda6f078cd6014a860903f515affa4d6a58748a':
  Slow down ripple background fade in from press
2014-10-09 22:23:16 +00:00
Alan Viverette
f90b6bd54f Always project ripples
We already handle bounding rect in draw(), so this just ensures
that ripples are always clipped to window background outlines
until we can implement more general clipping.

BUG: 17498583
Change-Id: Iaff51fb177b017a11822bdf4f31c117fc9522c15
2014-10-09 14:47:19 -07:00
Dianne Hackborn
d83e9e4280 am 0761b1b5: am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '0761b1b5ebb453a411e3289c1c972dbfddcee880':
  Put in real "code" (aka marketing) name.
2014-10-09 13:03:21 +00:00
Dianne Hackborn
529b78941c am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '89b196958fee07475765bd3c458098464ba16f2e':
  Put in real "code" (aka marketing) name.
2014-10-08 22:48:44 +00:00
Alan Viverette
f92f26fef2 Slow down ripple background fade in from press
BUG: 17433613
Change-Id: Ie9c4046532d61ad8ef8e044d14557db5d52e0d0b
2014-10-08 14:49:21 -07:00
Dianne Hackborn
955d8d69ea Put in real "code" (aka marketing) name.
Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
2014-10-07 20:17:19 -07:00
Alan Viverette
afb5b48e72 am 859edf79: am 0b6b0fa1: am 0660042a: Merge "Mutate and apply theme if needed before caching themed drawables" into lmp-mr1-dev
* commit '859edf7963a4e017fd2bbde51f1ab83517a5e8d6':
  Mutate and apply theme if needed before caching themed drawables
2014-10-07 22:22:35 +00:00
Alan Viverette
859edf7963 am 0b6b0fa1: am 0660042a: Merge "Mutate and apply theme if needed before caching themed drawables" into lmp-mr1-dev
* commit '0b6b0fa154b2c02b6ccd90fa083acf422adfcc8c':
  Mutate and apply theme if needed before caching themed drawables
2014-10-07 22:17:21 +00:00
Alan Viverette
727cae197b Mutate and apply theme if needed before caching themed drawables
This ensures that drawables are completely separated from their cached
constant states before applying a theme. After this, we can remove the
implicit (and incomplete) mutation in the clone constructors.

Also implements missing mutate() method on ClipDrawable.

BUG: 17646144
Change-Id: If0d66b0a85724d76e0a4f506758c7ba3c0aa3410
2014-10-07 15:08:47 -07:00
Derek Sollenberger
dfba4d3d11 Mutable Java Shaders with Immutable Native Shaders
bug: 17641888
Change-Id: I0f05387423cde185dab1a1453f89d5251ca1a4f9
2014-10-06 13:04:45 -04:00
Derek Sollenberger
ab22c1c792 cleanup so that the Paint.h is only accessed via its nativePtr not a JNI lookup
bug: 17641888
Change-Id: I8fc2a01fdcf62dd33b443b0a2302df5e29dc3f49
2014-10-06 09:02:38 -04:00
Alan Viverette
b4e8077b52 am 9f64867d: Merge "Fix theme propagation to contained android:drawable elements" into lmp-dev
* commit '9f64867da107b772b867876ddf979d1a3ec19192':
  Fix theme propagation to contained android:drawable elements
2014-10-02 23:41:44 +00:00
Alan Viverette
e32715d696 am c03d6f89: am 855e63e9: am 29345d8d: am 9f64867d: Merge "Fix theme propagation to contained android:drawable elements" into lmp-dev
* commit 'c03d6f89d0182d317bef0b810d5c4e62f8c7bad2':
  Fix theme propagation to contained android:drawable elements
2014-10-02 23:38:12 +00:00
Alan Viverette
39e33621a7 Fix theme propagation to contained android:drawable elements
BUG: 17790666
Change-Id: I6733a98e779cad0d384b917c57d2b3409a166c02
2014-10-02 15:54:23 -07:00
Neil Fuller
c2a0b4482d resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aosp
Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
2014-10-02 14:32:37 +01:00
Neil Fuller
f7cf5d43aa resolved conflicts for merge of ee665151 to lmp-dev-plus-aosp
Change-Id: I97671e62de26919e391dbb2686511584c59ab990
2014-10-02 11:48:08 +01:00
ztenghui
fee7f1b1d9 am ec81db6a: am c4306923: am 9e6a02b9: am ffa16f94: Merge "Correct the documentation for VectorDrawable" into lmp-dev
* commit 'ec81db6ab43de69a9bba333c1939e6213af085fa':
  Correct the documentation for VectorDrawable
2014-10-01 17:10:16 +00:00
Neil Fuller
33253a4baa Switch from FloatMath -> Math and Math.hypot where possible
The motivation is an API change: FloatMath is going to be
deprecated and/or removed. Performance is not the goal of
this change.

That said...

Math is faster than FloatMath with AOT compilation.

While making the change, occurances of:

{Float}Math.sqrt(x * x + y * y) and
{Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2))

have been replaced with:

{(float)} Math.hypot(x, y)

Right now there is no runtime intrinsic for hypot so is not faster
in all cases for AOT compilation:

Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with
AOT, but all other combinations of FloatMath, use of pow() etc.
are slower than hypot().

hypot() has the advantage of being self documenting and
could be optimized in future. None of the behavior differences
around NaN and rounding appear to be important for the cases
looked at: they all assume results and arguments are in range
and usually the results are cast to float.

Different implementations measured on hammerhead / L:

AOT compiled:

[FloatMath.hypot(x, y)]
benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials

[FloatMath.sqrt(x*x + y*y)]
benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials

[FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))]
benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials

[(float) Math.hypot(x, y)]
benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials

[(float) Math.sqrt(x*x + y*y)]
benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials

[(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))]
benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials

Interpreter:

benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials
benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials
benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials
benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I06c91f682095e627cb547d60d936ef87941be692
2014-10-01 14:04:15 +01:00
Alan Viverette
32eb1a52b3 am 6a26bf14: am eca52d91: am 35ebdd05: am b805da9b: Merge "Fix drawable container tinting" into lmp-dev
* commit '6a26bf14a9eed00ca4835c0b2cd3b1d89686db89':
  Fix drawable container tinting
2014-10-01 01:42:46 +00:00
Chris Craik
e5cc77e7e1 am e9d3c6ff: am d7de7b49: am 505c9d2c: am e910cc88: Merge "Implement alpha as documented for drawables" into lmp-dev
* commit 'e9d3c6ffa3aa5e175226c2b172c726204f4f1dce':
  Implement alpha as documented for drawables
2014-10-01 01:42:33 +00:00
ztenghui
bb2391929c am ffa16f94: Merge "Correct the documentation for VectorDrawable" into lmp-dev
* commit 'ffa16f944882f2e27109af8fe4b7272322f9cb84':
  Correct the documentation for VectorDrawable
2014-09-30 22:09:22 +00:00
ztenghui
c3fdffa981 Correct the documentation for VectorDrawable
We missed the alpha for the vector drawable root level in the documentation.
And the animation target can be vector drawable itself for the alpha value,
which is more than path and group object.

b/17696183

Change-Id: Ic9d441fbdf411dad92718ae5adbc6655fe708453
2014-09-30 15:02:24 -07:00
Alan Viverette
d11215b8bb am b805da9b: Merge "Fix drawable container tinting" into lmp-dev
* commit 'b805da9b592e67cb777b78db3a96d47c60e31ca7':
  Fix drawable container tinting
2014-09-30 14:55:36 +00:00
Chris Craik
75533864ac am e910cc88: Merge "Implement alpha as documented for drawables" into lmp-dev
* commit 'e910cc88387f49b119bb2f8e579849864970ac87':
  Implement alpha as documented for drawables
2014-09-30 14:55:26 +00:00
Alan Viverette
b805da9b59 Merge "Fix drawable container tinting" into lmp-dev 2014-09-30 00:32:30 +00:00
Alan Viverette
bddb843e79 Fix drawable container tinting
BUG: 17704311
Change-Id: Ib9ced41e8589352c852e6c9dc7abbe6e4b9f2520
2014-09-29 17:22:47 -07:00
Chris Craik
3f873d8644 Implement alpha as documented for drawables
bug:17693526

With this change, outline opacity isn't published by default, as was
intended. Default behavior for custom drawables is to have a
rectangular outline, but not cast a shadow, e.g. as a button
background.

Change-Id: If80a256ff359bcb58f3f593ec9018f2df5fc4e44
2014-09-29 21:14:43 +00:00
Alan Viverette
a389144009 am 143631f0: am d3957f25: am a6958574: am 63756956: Merge "Add callback to track and thumb drawables, propagate state in ASLD" into lmp-dev
* commit '143631f0d4a5f69b73ae9019e6a1ccbc895dc12e':
  Add callback to track and thumb drawables, propagate state in ASLD
2014-09-26 23:42:07 +00:00
Alan Viverette
cde6e29ac6 am 63756956: Merge "Add callback to track and thumb drawables, propagate state in ASLD" into lmp-dev
* commit '637569566d2234b06e08d94acf4db1b0d3be6501':
  Add callback to track and thumb drawables, propagate state in ASLD
2014-09-26 23:19:32 +00:00
Alan Viverette
b067405bf4 Add callback to track and thumb drawables, propagate state in ASLD
BUG: 17665424
Change-Id: I22da4530f3e2869d856102e804f020461a46fe49
2014-09-26 16:12:16 -07:00
Alan Viverette
0fff7819aa am 5c7ca487: am 5ad708bb: am a53b5408: am 81e2f789: Merge "Fixed mutate() for RippleDrawable, ASLD, AVD, fix applyTheme in VD" into lmp-dev
* commit '5c7ca487fe9cc3e67aceb988b964be1791dd2bde':
  Fixed mutate() for RippleDrawable, ASLD, AVD, fix applyTheme in VD
2014-09-26 20:53:02 +00:00
Alan Viverette
571cd7e938 am 81e2f789: Merge "Fixed mutate() for RippleDrawable, ASLD, AVD, fix applyTheme in VD" into lmp-dev
* commit '81e2f789029701b569d3c0deee8bc74fbebab5db':
  Fixed mutate() for RippleDrawable, ASLD, AVD, fix applyTheme in VD
2014-09-26 19:44:08 +00:00
Alan Viverette
5004032ebc Fixed mutate() for RippleDrawable, ASLD, AVD, fix applyTheme in VD
BUG: 17646144
Change-Id: I58c111d86224dc8f7f557073c0bcbc22ad74aa1b
2014-09-26 10:37:30 -07:00
Alan Viverette
aeeb822b6e am b02f1a0a: am e76f1b82: am a9517205: am 21662c96: Merge "Cut ripple background alpha in half" into lmp-dev
* commit 'b02f1a0abbf8ba92b845a4f1b2fcb4d0e4f431b2':
  Cut ripple background alpha in half
2014-09-26 00:25:36 +00:00
Alan Viverette
4f79d73d26 am 21662c96: Merge "Cut ripple background alpha in half" into lmp-dev
* commit '21662c96fa9d107a60f4ce98f7179264c972b142':
  Cut ripple background alpha in half
2014-09-25 20:23:50 +00:00
Alan Viverette
33ae07ab81 Merge "Cut ripple background alpha in half" into lmp-dev 2014-09-25 20:14:34 +00:00
Alan Viverette
8bdb442703 Cut ripple background alpha in half
Ripple alpha is supposed to be split evenly between the foreground
ripple layer and the background layer, but the background alpha wasn't
getting adjusted properly.

BUG: 17658817
Change-Id: I7af2f2ed38400a40d4a17da020363c7ae5c71a7b
2014-09-25 13:06:03 -07:00
ztenghui
134fe8ef66 am 4706b24e: am 6bdc2e08: am 7ac0a907: am c793e67c: Merge "Fix AVD for CTS failure." into lmp-dev
* commit '4706b24e3d15b5b593a48658eab4af60df782a2e':
  Fix AVD for CTS failure.
2014-09-25 17:05:34 +00:00
ztenghui
533b4d3e51 am c793e67c: Merge "Fix AVD for CTS failure." into lmp-dev
* commit 'c793e67ca93a1550fa68c887ef00d207ac1e1d84':
  Fix AVD for CTS failure.
2014-09-24 23:18:15 +00:00
ztenghui
dde353394c Merge "Fix AVD for CTS failure." into lmp-dev 2014-09-24 23:07:18 +00:00