2103 Commits

Author SHA1 Message Date
Alan Viverette
264ea9c35f Merge "Apply VectorDrawable color filter at draw time" into lmp-dev 2014-09-12 23:47:55 +00:00
Alan Viverette
b07b086bd4 Apply VectorDrawable color filter at draw time
BUG: 17491152
Change-Id: Ia0ca0bd7cd00363ad5777d3e2e62fa1131a6d8a5
2014-09-12 16:37:44 -07:00
Alan Viverette
6d32576312 Merge "Report button opacity for current state, fix button shadows" into lmp-dev 2014-09-12 23:14:33 +00:00
Alan Viverette
888b4cf73c Report button opacity for current state, fix button shadows
BUG: 17433604
Change-Id: I25e0bd9b96e09ed2a4d85476b60f459e7cc33002
2014-09-12 16:13:32 -07:00
ztenghui
74cc5c39ae Merge "Add root alpha and animation to (Animated)VectorDrawable" into lmp-dev 2014-09-12 22:12:03 +00:00
ztenghui
8490354dc6 Add root alpha and animation to (Animated)VectorDrawable
b/17393626

Change-Id: If6a28b072f7d4bcb2b57022d86ec784f4c0d78f1
2014-09-12 15:11:10 -07:00
Alan Viverette
607bd84826 Update icons to vectors, fix preload theming & vector tinting
Adds a missing JNI binding to AssetManager, ensures drawables have
default tint modes as documented, and updates vector tint appropriately
when state changes.

BUG: 17385604
Change-Id: Ice92885989ebc13b95952f5dc3b7904cc956da12
2014-09-12 13:06:45 -07:00
Chet Haase
25877af238 Merge "Unfilled shapes should not report themselves as opaque" into lmp-dev 2014-09-12 00:54:18 +00:00
Chet Haase
22cf0b0cb8 Unfilled shapes should not report themselves as opaque
Issue #17470611 Stroked, unfilled GradientDrawable shouldn't cast a shadow

Change-Id: Ied60e12c2d2567efec8dac1fe69c77b49ef25b8e
2014-09-11 17:45:43 -07:00
Chris Craik
9bc13a353f Fix null rect parameter for saveLayer / saveLayerAlpha
bug:17476559
Change-Id: I3ba43c9eed8f6fc455eb41e0990e75e0f4c7b648
2014-09-11 16:55:10 -07:00
ztenghui
c96e392765 Merge "Bring back the fillAlpha and strokeAlpha." into lmp-dev 2014-09-11 16:32:37 +00:00
Alan Viverette
87610e535d Merge "Copy opaque over shape in GradientDrawable copy constructor" into lmp-dev 2014-09-11 00:22:10 +00:00
Alan Viverette
c3a63c1fbb Copy opaque over shape in GradientDrawable copy constructor
BUG: 17433604
Change-Id: I8eeba8bd68930db178545a3b25e29c3c45ae1f79
2014-09-10 16:54:02 -07:00
ztenghui
2e17d2b232 Bring back the fillAlpha and strokeAlpha.
At the same time, remove the group alpha since we did not follow the convention
that group's alpha should apply together, not separately to each elements.

b/17393626

Change-Id: Idfc071414213583924961dc8ea760d6fb317873c
2014-09-10 16:26:48 -07:00
Alan Viverette
5aaa7788d5 Merge "Only force drawing in RippleDrawable when necessary" into lmp-dev 2014-09-10 23:26:06 +00:00
Chet Haase
6f6578e81c Use constant state in AnimatedVectorDrawable
Complex animated vector drawables can be expensive to load due to
sub-optimal parsing of the String-based pathData. Suffering that penalty
every time the same drawable is loaded (such as material-themed
ProgressBars) is painful.

The new approach caches constant state of both the VectorDrawable (including
the pathData geometry) and the animators (which includes potentially expensive
path-based interpolators).

issue #17366831 Material ProgressBar taking 200+ms to inflate

Change-Id: Iba3b541e24cfce8c07f5aa9fe6aa7d7b92b2fe1c
2014-09-10 21:21:53 +00:00
Alan Viverette
8683a4f819 Only force drawing in RippleDrawable when necessary
BUG: 17451761
Change-Id: Ibb9d1c64791ec54eb90608c957eeb5efb1712b4a
2014-09-10 14:05:15 -07:00
George Mount
b7d63aedf5 Merge "Use intrinsic size for path animation in AnimatedVectorDrawable" into lmp-dev 2014-09-10 14:30:17 +00:00
George Mount
fd3c4744f2 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
2014-09-09 17:09:57 -07:00
Svetoslav
62ce332c14 Trim unnecessary pages when printing.
A user may request a subset of the document's pages to be printed.
In this case the expectation is that the resulting document does
not include not selected pages. While print serivices can do the
trimming themselves or the printer may do so, moving, potantually
many, redundant pages is inefficient. The real problem is when
saving to a PDF file where the saved file must not have the pages
the user did not select. This change adds shredding of undesired
pages from the PDF before saving it or passing it to a print service.
:
bug:17285994

Change-Id: I7deba535af99457bea3c118202314f0f3812e809
2014-09-09 09:38:07 -07:00
Alan Viverette
e9921370d7 Merge "Simplify ripple background drawing, fix ripple alphas" into lmp-dev 2014-09-05 23:45:36 +00:00
Alan Viverette
f2f3bde62f Merge "Remove old setTint from Drawable" into lmp-dev 2014-09-05 20:06:02 +00:00
Alan Viverette
bd5afc7186 Remove old setTint from Drawable
BUG: 15782973
Change-Id: Idf0a6ea7c81135b032fcdadc46ee78d7db6945c7
2014-09-05 12:23:18 -07:00
Alan Viverette
a3f0c2b21a Simplify ripple background drawing, fix ripple alphas
Eliminates an extra saveLayer on the background in the common case of
a rectangle-bounded ripple.

Ripples and backgrounds are now drawn at 50% opacity of the ripple
color, which ensures that both the ripple and background are visible
and that the pressed state has a correct combined alpha.

Also fixes a bug where hardware (RT) animation was getting turned off
prematurely.

BUG: 17405007
BUG: 17398089
BUG: 17394445
BUG: 17389859
Change-Id: Idb5808368fe563581a51a8cb9778275ee8d22f4c
2014-09-05 19:15:44 +00:00
Chris Craik
def8a37128 Merge "Replace native crash with IAE when calling picture.draw() w/ a HW canvas" into lmp-dev 2014-09-05 17:49:20 +00:00
Chris Craik
96890564bd Replace native crash with IAE when calling picture.draw() w/ a HW canvas
bug:17397958
Change-Id: I75f942db0e604f9fd6ab31e6c81f718c0f57b16a
2014-09-05 10:33:39 -07:00
Chris Craik
0edfd0be15 Merge "Hide color filter mutability" into lmp-dev 2014-09-05 17:30:50 +00:00
Chris Craik
954ad62947 Hide color filter mutability
bug:17262092

Change-Id: I1662194958dac9f5ebf943d17fa9074f1b6a0168
2014-09-04 16:53:14 -07:00
Alan Viverette
a2362c9251 Clear ripple animations on cancel/end
This prevents subsequent calls to end() from snapping the background
opacity (among others) back to 1.

BUG: 17357749
BUG: 17349157
Change-Id: I2a4870ed588ba98986428983bf29b556cdc9a701
2014-09-04 12:16:40 -07:00
Alan Viverette
94b88e7103 Merge "Remove partial support for hotspot changes on focus movement" into lmp-dev 2014-09-03 18:31:47 +00:00
Chet Haase
90ab047540 Merge "Fix behavior of inflating InsetDrawable" into lmp-dev 2014-09-03 14:55:30 +00:00
Alan Viverette
36bdc9fe9a Merge "Make sure ripple background bounds are used for invalidation" into lmp-dev 2014-09-02 23:56:15 +00:00
Chet Haase
014e14b242 Fix behavior of inflating InsetDrawable
A recent change to InsetDrawable changed the behavior of inflating
an InsetDrawable when it already had a valid bitmap. The new behavior
avoids throwing an exception with a bad resource where it used to
throw, because the existence of the bitmap makes it avoid trying to
load the resource at all.

The fix is to reintroduce the old behavior of forcing it to load the
resource regardless of the state of its bitmap.

Issue #17068252 InsetDrawable inflation CTS test is failing

Change-Id: I941388730d4479f8f4747a7985754ffdf5133f04
2014-09-02 16:28:48 -07:00
Alan Viverette
a8a8ff000b Remove partial support for hotspot changes on focus movement
Also removes unused x/y position and tween values on RippleBackground. The
background is now always centered within the hotspot area.

BUG: 17300399
Change-Id: I1904c9f44e6bebb2b434d2b092205edd42204263
2014-09-02 15:58:03 -07:00
Alan Viverette
be0dd99bac Make sure ripple background bounds are used for invalidation
BUG: 17349157
Change-Id: Ie88fbabbc66349aea9b7d00e28ca12f93776a4a7
2014-09-02 15:05:27 -07:00
Svet Ganov
561b893174 Merge "Move print rendering in an isolated process." into lmp-dev 2014-09-02 21:51:47 +00:00
Svet Ganov
13f542cabd Move print rendering in an isolated process.
Security review of the PDF rendering code revealed that it is
not sercure. Therefore, this code must be run in a sandbox.
This change moves the rendering code in an isolated process.

bug:16897933

Change-Id: I711ce42a56892db1837950137bfaa79e1d61a7c4
2014-09-02 11:40:44 -07:00
Alan Viverette
be50bd76a9 Merge "Fix disappearing ripple background, treat active ripple separately" into lmp-dev 2014-08-30 00:19:51 +00:00
Alan Viverette
7ff48839b0 Variety of small UI tweaks
Updates dialog padding, text opacities on dark theme, progress bar
opacity, ripple background exit speed, remove unnecessary text color
attribute from action menu item layout, fix secondary and tertiary
disabled state text colors.

BUG: 17321765
BUG: 17333263
BUG: 17322159
BUG: 17330086
Change-Id: I14473a985b2c6b853afe7db535a2443e934238e9
2014-08-29 15:20:13 -07:00
Alan Viverette
fdbb98e56d Fix disappearing ripple background, treat active ripple separately
There is only a single background, and it did not correctly handle
enter() being called while exit() was busy animating. We now cancel
all animations when starting an enter or exit. Also separates the
active ripple from the list of animating (exiting) ripples.

BUG: 17042060
BUG: 17281011
Change-Id: I4d4e33560867c7c71c1bdb72b17d52d6fbd86f68
2014-08-29 19:54:59 +00:00
Alan Viverette
327710e36f Merge "Preserve inner drawable bounds and level on mutate" into lmp-dev 2014-08-27 22:29:19 +00:00
Alan Viverette
719da6ba9b Merge "Fix NPE in RippleDrawable" into lmp-dev 2014-08-27 20:04:28 +00:00
Alan Viverette
d7853e5763 Preserve inner drawable bounds and level on mutate
Also includes a tiny change to progress bar background alpha, which was
too dark to see.

BUG: 17285057
Change-Id: I8b0cc1c2c9405558b8163d8db9374d7c748317a2
2014-08-27 17:45:28 +00:00
Raph Levien
772d576b97 Merge "New weight-aware font config" into lmp-dev 2014-08-27 16:24:37 +00:00
Raph Levien
117cbebe81 New weight-aware font config
Parse new fonts.xml config file, and resolve weight selection based on
the base weight of the font (as defined by a weight alias specified in
the config file) and the requested bold flag. This change improves the
appearance of bold spans for alternate weights of Roboto.

In addition, this patch enables weight selection for fallback fonts.
For example, if an additional font with a weight of 100 is added to the
Hebrew font family in the fallback list, then requesting
"sans-serif-thin" would select that font for Hebrew text.

Bug: 14538154
Change-Id: I99a04fad4f7bf01c75726e760d42735dd9003496
2014-08-26 19:37:45 -07:00
Alan Viverette
40e38d4367 Fix NPE in RippleDrawable
Invalidate was called while we were busy clearing the list of
animating ripples, which led to an inconsistency between the
ripple count and actual state of the ripple list.

BUG: 17136636
BUG: 17281011
Change-Id: Ifb7be7eb334ad9a44cc3a1e6f55ad1e35218989a
2014-08-26 17:08:21 -07:00
Chris Craik
b34eeb70a6 Merge "Notify VM of native pixelref allocations" into lmp-dev 2014-08-26 21:47:46 +00:00
Chris Craik
4cd7dbc90f Notify VM of native pixelref allocations
bug:17178931
Change-Id: I0de22bb0d2ae8233d392b7e222f72391aaa12ce8
2014-08-26 13:10:33 -07:00
ztenghui
ae82e604fa Merge "VD: Update the fillColor default as transparent" into lmp-dev 2014-08-26 18:18:16 +00:00
Chris Craik
8afd0f245c Create z reordering boundaries around dispatchDraw
bug:16012254

This means rendernodes with a Z will no longer be drawn at the end of
their parent's DisplayList, but at the end of the associated reorder
region (DisplayListData::Chunk).

Change-Id: Ia033fee9d9a4db567b2a8d5e90fc57a4d0a64544
2014-08-25 15:35:40 -07:00