2232 Commits

Author SHA1 Message Date
Alan Viverette
710f713baa am 84ed482f: am 1c252a6f: Merge "Fix default attributes in ScaleDrawable" into lmp-mr1-dev automerge: 26478ba
* commit '84ed482ff9a9e8f6ea6e14c978d4311f23396bc6':
  Fix default attributes in ScaleDrawable
2014-11-12 23:59:40 +00:00
Alan Viverette
84ed482ff9 am 1c252a6f: Merge "Fix default attributes in ScaleDrawable" into lmp-mr1-dev automerge: 26478ba
* commit '1c252a6f8b3dbeb7aa533203731256b3b037d3e2':
  Fix default attributes in ScaleDrawable
2014-11-12 23:40:10 +00:00
Alan Viverette
f9afb46bf7 Fix default attributes in ScaleDrawable
Reverts default scales to correct value of -1, uses existing state
values when updating from typed array.

BUG: 18351309
Change-Id: I45d21fe017a7bea10e3cbda50f6db65d053aa2ec
2014-11-12 10:24:40 -08:00
Alan Viverette
9355b66dc5 am fca5f35e: Merge "Reduce number of saveLayer calls in RippleDrawable" into lmp-mr1-dev automerge: b724314 automerge: 0bc1eee
* commit 'fca5f35e17591681fa321ee894d47a084f6537ee':
  Reduce number of saveLayer calls in RippleDrawable
2014-11-12 16:36:32 +00:00
Alan Viverette
fca5f35e17 Merge "Reduce number of saveLayer calls in RippleDrawable" into lmp-mr1-dev automerge: b724314
automerge: 0bc1eee

* commit '0bc1eee096e04d9d0a405961b56569446c0e79ab':
  Reduce number of saveLayer calls in RippleDrawable
2014-11-12 03:25:07 +00:00
Alan Viverette
b724314516 Merge "Reduce number of saveLayer calls in RippleDrawable" into lmp-mr1-dev 2014-11-12 02:04:22 +00:00
Alan Viverette
cc3c573334 Reduce number of saveLayer calls in RippleDrawable
Removes an extra saveLayer call by rendering ripples as overlapping. We
are now down to zero saveLayers when drawing unmasked ripples or ripples
masked against opaque content/masks, one saveLayer for ripples masked
against content and two saveLayers when masked against an explicit mask
layer.

BUG: 18226391
Change-Id: I0fc09d21fbc462fbcfe4c26fc7b18737f584043e
2014-11-07 15:31:16 -08:00
Alan Viverette
75d1cbd71b am e37c761e: am c30a7623: am 48c8cd06: Merge "Support theme attributes in StateListDrawable <item> element" into lmp-mr1-dev
* commit 'e37c761e5e850aebb3be56a2eadaa85cc2134547':
  Support theme attributes in StateListDrawable <item> element
2014-11-07 22:27:24 +00:00
Alan Viverette
e37c761e5e am c30a7623: am 48c8cd06: Merge "Support theme attributes in StateListDrawable <item> element" into lmp-mr1-dev
* commit 'c30a7623a2f97ce791ed019d7014b842f9c9b7d2':
  Support theme attributes in StateListDrawable <item> element
2014-11-07 22:20:09 +00:00
Alan Viverette
d6570d11e4 Support theme attributes in StateListDrawable <item> element
Also adds support for specifying drawable as a color since getDrawable()
automatically wraps colors to ColorDrawable. Does not currently allow
themed item elements to be used in Zygote preload, but we can add that
at some point in the future.

BUG: 18208662
Change-Id: I4c9721ffd100da4b9db7743a46c914828b943dae
2014-11-06 13:50:22 -08:00
Alan Viverette
2fe08558cc am 9fb51ad8: am a04a5e82: am 6e85abd4: Merge "Default gradient radius to %p when no intrinsic width or height set" into lmp-mr1-dev
* commit '9fb51ad840f445c387994ff1ebf8913b9d918f6a':
  Default gradient radius to %p when no intrinsic width or height set
2014-11-05 00:57:24 +00:00
Alan Viverette
9fb51ad840 am a04a5e82: am 6e85abd4: Merge "Default gradient radius to %p when no intrinsic width or height set" into lmp-mr1-dev
* commit 'a04a5e82f0b84d57394c28600e3b142d649880cb':
  Default gradient radius to %p when no intrinsic width or height set
2014-11-05 00:51:45 +00:00
Alan Viverette
b4f8a98176 Default gradient radius to %p when no intrinsic width or height set
BUG: 18224018
Change-Id: I05cbe3023d0a5e6813658063d3a3633c6ddd8d96
2014-11-03 18:45:23 -08:00
Svet Ganov
e73c6d93b9 am 28d51a39: am 182f0a13: Merge "Crash apps that print malformed or password protected PDFs." into lmp-mr1-dev automerge: 4f5b8a6
* commit '28d51a39a1bed35855b0fe75a65ad4a6d43a4460':
  Crash apps that print malformed or password protected PDFs.
2014-11-01 00:32:52 +00:00
Svet Ganov
28d51a39a1 am 182f0a13: Merge "Crash apps that print malformed or password protected PDFs." into lmp-mr1-dev
automerge: 4f5b8a6

* commit '4f5b8a6b9b1966b42c929f89e1e91827ec495719':
  Crash apps that print malformed or password protected PDFs.
2014-11-01 00:27:30 +00:00
Svet Ganov
fce84f035c Crash apps that print malformed or password protected PDFs.
If apps are writing malformed content (typically not a PDF file) or if the
PDF content they provide to the print system is password protected, are now
crashed as both of these are app bugs.

bug:17636435

Change-Id: Ifce6a3199e587448dd38f6a84290a965c24b698b
2014-11-01 00:06:08 +00:00
Svetoslav
a3b6fc48b7 am 2a6749ad: am 93134ce8: Merge "Save to a PDF file should look like print preview." into lmp-mr1-dev automerge: 160021d
* commit '2a6749adc0d0693b97c81b6083629e13b604d45a':
  Save to a PDF file should look like print preview.
2014-10-31 20:04:19 +00:00
Svetoslav
2a6749adc0 am 93134ce8: Merge "Save to a PDF file should look like print preview." into lmp-mr1-dev
automerge: 160021d

* commit '160021d8cf62f566587d899498c72fff82b6969f':
  Save to a PDF file should look like print preview.
2014-10-31 19:59:53 +00:00
Svetoslav
93134ce87e Merge "Save to a PDF file should look like print preview." into lmp-mr1-dev 2014-10-31 19:54:05 +00:00
Svetoslav
bec22beb99 Save to a PDF file should look like print preview.
When rendering a PDF file for print preview we take into account
the selected print options such as paper size, orientation, etc
without modifying the document. To print we send the doc in its
original form and the print options so the print service can apply
the necessary transforms in addition to the optional custom options
it supports. When saving to PDF we have to actually change the
document as we act as a print service.

bug:13545980

Change-Id: Icdcecf962bec6ff742cc6015df5af9d9086ce760
2014-10-31 10:41:34 -07:00
Alan Viverette
613d43473e am 71c27899: am e9e7d012: am 272e2f73: Merge "Ensure we don\'t pass null values in to Theme.resolveAttributes" into lmp-mr1-dev
* commit '71c2789930de7fb1b98ad10ea6a5e6f23500ead2':
  Ensure we don't pass null values in to Theme.resolveAttributes
2014-10-31 00:36:28 +00:00
Alan Viverette
71c2789930 am e9e7d012: am 272e2f73: Merge "Ensure we don\'t pass null values in to Theme.resolveAttributes" into lmp-mr1-dev
* commit 'e9e7d012dd7df56227854fd0887b6f0476db8b67':
  Ensure we don't pass null values in to Theme.resolveAttributes
2014-10-31 00:28:11 +00:00
Alan Viverette
2929579d20 am 370403db: am 07a08010: am 425b1dc8: Merge "Add theme and config change support to more Drawable types" into lmp-mr1-dev
* commit '370403dbdec3a1d769c31aca66e5fcbd6617c897':
  Add theme and config change support to more Drawable types
2014-10-31 00:25:33 +00:00
Alan Viverette
370403dbde am 07a08010: am 425b1dc8: Merge "Add theme and config change support to more Drawable types" into lmp-mr1-dev
* commit '07a08010a87daec2091b643a8fcf2f7a27588098':
  Add theme and config change support to more Drawable types
2014-10-31 00:14:51 +00:00
Alan Viverette
7f4a63d1eb Ensure we don't pass null values in to Theme.resolveAttributes
BUG: 18182274
Change-Id: I08acf877cb81478cc205254edf92a31fcf05991d
2014-10-30 10:29:03 -07:00
Alan Viverette
425b1dc88c Merge "Add theme and config change support to more Drawable types" into lmp-mr1-dev 2014-10-30 00:24:28 +00:00
Alan Viverette
d21fd9d1cc Add theme and config change support to more Drawable types
BUG: 16045735
Change-Id: Ic03173a1c1779c1bb545c4c389f77afed97011ee
2014-10-29 10:24:42 -07:00
Alan Viverette
c6dac7ef17 am 51547e75: am eba0a750: Merge "Clean up GradientDrawable styled attributes, fix useLevelForShape" into lmp-mr1-dev automerge: 91a1a72
* commit '51547e750e30801e2d367433d8cd59f6b77fdc8c':
  Clean up GradientDrawable styled attributes, fix useLevelForShape
2014-10-25 02:36:06 +00:00
Alan Viverette
51547e750e am eba0a750: Merge "Clean up GradientDrawable styled attributes, fix useLevelForShape" into lmp-mr1-dev automerge: 91a1a72
* commit 'eba0a7509178094a46c3cca212bc3f07e70b159e':
  Clean up GradientDrawable styled attributes, fix useLevelForShape
2014-10-24 23:03:11 +00:00
Alan Viverette
969ca91acd Clean up GradientDrawable styled attributes, fix useLevelForShape
BUG: 18117976
Change-Id: Iff2ea392204346f68ea47d577e442d398114e5d8
2014-10-24 12:25:04 -07:00
Yigit Boyar
ba4814a49c am ab43570f: am f3ab4410: am fa9ed8ca: Merge "Added a generic configuration and theme based cache" into lmp-mr1-dev
* commit 'ab43570f5db770e55a73ccff346b3e922443d126':
  Added a generic configuration and theme based cache
2014-10-23 22:18:17 +00:00
Yigit Boyar
ab43570f5d am f3ab4410: am fa9ed8ca: Merge "Added a generic configuration and theme based cache" into lmp-mr1-dev
* commit 'f3ab441090a05bd428b9488b2e8e175f33bd6fe9':
  Added a generic configuration and theme based cache
2014-10-23 22:04:11 +00:00
Yigit Boyar
d422dc358f Added a generic configuration and theme based cache
For now, only animators use it but we can consider migrating
drawable cache to it as well.

Bug: 17456416
Change-Id: I571b96856805edb171f0fc52e6bff5a365f46b70
2014-10-23 11:46:01 -07:00
Derek Sollenberger
425cc668a9 Merge "Refactor HWUI to better handle Canvas DrawFilters." 2014-10-22 15:59:28 +00:00
Alan Viverette
ac68e997b9 am ef2fef17: am ed89e452: am 7c133e19: Merge "Fix gradient drawable radius when specified as float, dimension" into lmp-mr1-dev
* commit 'ef2fef1719c3c2db5d44b8c6c78db2cf7d6ac882':
  Fix gradient drawable radius when specified as float, dimension
2014-10-21 18:43:50 +00:00
Alan Viverette
ef2fef1719 am ed89e452: am 7c133e19: Merge "Fix gradient drawable radius when specified as float, dimension" into lmp-mr1-dev
* commit 'ed89e45253ffded993ed88cd33457f45dbd6a32b':
  Fix gradient drawable radius when specified as float, dimension
2014-10-21 18:39:06 +00:00
Alan Viverette
7fd807d8f4 am 2c861c78: am 0a8a3eab: am 46b4920a: Merge "Propagate state changes even when we don\'t change drawable index" into lmp-mr1-dev
* commit '2c861c782d84c61687c969605c28d543a1754e63':
  Propagate state changes even when we don't change drawable index
2014-10-21 18:38:53 +00:00
Alan Viverette
2c861c782d am 0a8a3eab: am 46b4920a: Merge "Propagate state changes even when we don\'t change drawable index" into lmp-mr1-dev
* commit '0a8a3eab8bfc3390e1225dfade40599279b4921b':
  Propagate state changes even when we don't change drawable index
2014-10-21 18:29:02 +00:00
Alan Viverette
7c133e19dd Merge "Fix gradient drawable radius when specified as float, dimension" into lmp-mr1-dev 2014-10-21 18:25:01 +00:00
Alan Viverette
46b4920ac8 Merge "Propagate state changes even when we don't change drawable index" into lmp-mr1-dev 2014-10-21 18:14:50 +00:00
Alan Viverette
2efbe9816e Fix gradient drawable radius when specified as float, dimension
BUG: 18070756
Change-Id: I991ff792c376c9695a007f8f1187390ab5ff6e3c
2014-10-21 11:04:04 -07:00
Derek Sollenberger
662d8a3688 Merge "Ensure that all requests for the Paint's nativePtr use p.getNativeInstance()" 2014-10-21 11:41:09 +00:00
Alan Viverette
f81c6af10e Propagate state changes even when we don't change drawable index
Previously we could miss the state change if we were simply reversing the
current transition.

BUG: 17967405
Change-Id: I2cb396dedbff61b980741ef8c0d931be6abe129c
2014-10-20 14:42:53 -07:00
ztenghui
f164f2bca6 am 9aa6ea10: am 8c857eec: am 12d808a2: am a724d1ab: am 877ce2c4: Merge "Make sure the bitmap from VD\'s cache is drawn using bi-linear filter." into lmp-dev
* commit '9aa6ea106d7aec78e5ea4ea251c1eac146496fa6':
  Make sure the bitmap from VD's cache is drawn using bi-linear filter.
2014-10-20 21:04:42 +00:00
ztenghui
9aa6ea106d am 8c857eec: am 12d808a2: am a724d1ab: am 877ce2c4: Merge "Make sure the bitmap from VD\'s cache is drawn using bi-linear filter." into lmp-dev
* commit '8c857eec746307dfeb8acb6b080ecc2aa8476ece':
  Make sure the bitmap from VD's cache is drawn using bi-linear filter.
2014-10-20 20:56:09 +00:00
ztenghui
12d808a24f am a724d1ab: am 877ce2c4: Merge "Make sure the bitmap from VD\'s cache is drawn using bi-linear filter." into lmp-dev
* commit 'a724d1ab4083f08958bd88e76e15b7c0af337bfc':
  Make sure the bitmap from VD's cache is drawn using bi-linear filter.
2014-10-20 20:42:51 +00:00
Derek Sollenberger
09c2d4fe15 Refactor HWUI to better handle Canvas DrawFilters.
First, this CL removes the need to decompose the DrawFilters
in Java and instead passes the SkDrawFilter to HWUI directly.
This also allows the removal of duplicated logic between HWUI
and other Canvas implementations regarding Paint filter levels.

Second, the DrawFilter is now stored in the DisplayListRenderer
where we apply it to every paint BEFORE it is stored in the
DisplayList.  This eliminates the need to filter all Paints on
playback and removes additional complexity at playback.

Finally, as a result of storing the filtered paint we can now
do a better job caching the paints.  This takes advantage of
recent changes in Skia to quickly enable quick hashing and
comparison of paint objects.

Change-Id: Iec507a2d894827975cc4f1d22241542bb0534b4e
2014-10-17 10:44:29 -04:00
Derek Sollenberger
f4242b107c Ensure that all requests for the Paint's nativePtr use p.getNativeInstance()
Since requesting the native pointer triggers specific paint behavior we need
to ensure that the field is private and that callers use the public method.

Change-Id: I598a8bf2904960023397728c1ce4502ce408348e
2014-10-17 08:22:46 -04:00
ztenghui
eec6164e6f Make sure the bitmap from VD's cache is drawn using bi-linear filter.
b/17949291

Change-Id: I0e59852220ab8a3be2c70afa483e805029a9e19e
2014-10-16 15:40:04 -07:00
Alan Viverette
2d7ba84349 am fac81d40: am 274d24f1: am b70cfb91: Merge "Avoid saveLayer in RippleDrawable if the background won\'t draw" into lmp-mr1-dev
* commit 'fac81d40e1e1910a4f6931c77ea0f313518f357f':
  Avoid saveLayer in RippleDrawable if the background won't draw
2014-10-15 21:30:49 +00:00