1669 Commits

Author SHA1 Message Date
Alan Viverette
9453b7cfd4 Color theming for VectorDrawable, general clean up
BUG: 13878079
Change-Id: I831d26fe3a2658161fc24e947bce382d0be6b548
2014-04-07 16:50:46 -07:00
Alan Viverette
e106ac7f7c Fix sharing of child bounsd within touch feedback drawable
Change-Id: I13f2f32fb618f07bd967d98d6369399f1d790125
2014-04-07 10:58:25 -07:00
Leon Scroggins
cc11f15f76 Update to call new Skia APIs.
I816129d49c0118453222916f3c818eccac33663d merges a new version of
Skia that updates various APIs. Call the new ones.

SkBitmap::copyTo now takes an SkColorType instead of an
SkBitmap::Config, so do the conversion with
SkBitmapConfigToColorType or use the enum when it makes sense.

Call SkImageDecoder::decodeSubset instead of (deprecated)
SkImageDecoder::decodeRegion.

Override SkCanvas::ClipVisitor::clipRRect in ClipCopier.

In Canvas::clip calls, call SkCanvas::isClipEmpty(), which was
previously called inside the clip call, to determine the return value.

For various SkPaint effects, call the new factories (as the constructors
have been made protected).

Implement SkJavaOutputStream::bytesWritten(), overriding a new pure
virtual function on SkWStream.

Update Matrix calls to always return true (since SkMatrix calls no
longer return a value).

Depends on I816129d49c0118453222916f3c818eccac33663d (skia).

Change-Id: I5cdcea827ebff587df0bbddc0965e3e0fbf48002
2014-04-04 14:42:39 -04:00
ztenghui
a0a09e88dd Merge "Clean up on VectorDrawable." 2014-04-03 16:32:28 +00:00
Alan Viverette
45dc35b3c9 Fix dialog style, selectable item bg pinning, and pressed state
BUG: 13746931
Change-Id: I31c2959f3e773a3aeb66ba5842d8d6fbb288acc1
2014-04-02 19:32:15 -07:00
ztenghui
fba3bad387 Clean up on VectorDrawable.
Rename the test from DynamicDrawableTest to VectorDrawableTest.
Remove duplicate function calls in the test.
Fix comments in VectorDrawable

Change-Id: I1ef87137088ccc10b1abdb40ca368345d9dbadab
2014-04-02 17:31:08 -07:00
ztenghui
177dffd869 Getting the version information into the VectorDrawable
This will allow version controling for later API improvement.
We will only support version 1 so far.

Change-Id: I322e63f6cff157ebb6df5d80625c39bf96ff3659
2014-04-02 11:28:32 -07:00
Alan Viverette
1c4e36c973 Clean up LayerDrawable, ensure cached values are cleared on changes
Change-Id: I9a652475b6ad66379b1298bf53cd5dcb1a1dd37b
2014-03-31 12:07:58 -07:00
Alan Viverette
e3eb8ec0b7 Allow a null tint in TouchFeedbackDrawable
This ensures we won't crash if a Quantum drawable is inflated in a
Holo theme, but it won't look correct, so don't do that.

BUG: 13677025
Change-Id: I30cbff36bf3746543240d4c96cc57776874566d8
2014-03-27 15:21:11 -07:00
Adam Lesinski
776abc24cd Uses VMRuntime.newUnpaddedArray for ideal array sizes
Bug:13028925

Change-Id: I0a9301248b10a339afbdc5e4ffe3310ac4fa1fb7
2014-03-27 11:42:10 -07:00
Alan Viverette
2c5d6d742a Merge "Separate ripple animation logic, remove RevealDrawable" 2014-03-27 00:31:53 +00:00
John Hoford
abb7d134c0 add Dynamic Drawable (vector graphics for Icons)
Change-Id: Id44b7f6d1b8dd073b8ed35e2142a380550f2449b
2014-03-26 16:59:54 -07:00
Alan Viverette
47bf0d95ef Separate ripple animation logic, remove RevealDrawable
Change-Id: I9d0370cea288e6caf518209b5bc94a66a0f9176f
2014-03-26 16:43:07 -07:00
Chris Craik
c21929c710 Merge "Fix doc build" 2014-03-25 18:08:30 +00:00
Chris Craik
f975823773 Fix doc build
Change-Id: I18627229be3e8e242e469af83e7e5ae580b03707
2014-03-25 11:06:58 -07:00
Tim Kilbourn
803d91b2b2 Fix NPE when inflating GradientDrawables.
Change-Id: If624d6efac61dabe6009ee4368ad7b119e1d4dcd
2014-03-25 10:13:02 -07:00
Alan Viverette
840dede901 Unhide touch feedback drawable and wrapper
Change-Id: I98926d4adfb6e8c6130b31c8f4534a1a382d0f3b
2014-03-24 19:54:34 -07:00
Alan Viverette
52b999f072 Implement APIs for obtaining, caching themed Drawables
When Drawables are inflated during preload (or otherwise without a theme)
they cache their themeable attributes in their constant state as an array
keyed on attribute index. Drawables inflated with a theme will simply
resolve theme attributes as part of normal inflation, and they will not
cache any themeable attributes.

Drawables obtained from Resources are pulled from theme-specific cache
when possible. If an unthemed Drawable exists in the preload cache, a
new constant state will be obtained for the Drawable and the theme will
be applied by resolving the cached themeable attributes and overwriting
their respective constant state properties. If no cached version exists,
a new Drawable is inflated against the desired theme.

Constant states from themed drawables may be cached if the applied theme
is "pure" and was loaded from a style resource without any subsequent
modifications.

This CL does not handle applying themes to several Drawable types, but it
fully supports BitmapDrawable, GradientDrawable, NinePatchDrawable,
ColorDrawable, and TouchFeedbackDrawable.

BUG: 12611005
Change-Id: I4e794fbb62f7a371715f4ebdf946ee5f9a5ad1c9
2014-03-24 18:00:26 -07:00
Chris Craik
76c30ce3c1 Merge "Rework Outline API, remove isolatedZVolume remnants" 2014-03-24 21:22:36 +00:00
John Reck
1e1f4d705e am 02e99e27: am ae316643: am aff40e25: am fc603ca6: am abf701e6: Merge "Eliminate mHasAlpha" into klp-dev
* commit '02e99e272dbfedf5d9ba1ae91fa2b83cab5b3d07':
  Eliminate mHasAlpha
2014-03-24 18:44:01 +00:00
Chris Craik
b49f446c98 Rework Outline API, remove isolatedZVolume remnants
Change-Id: I30c2fe832dcb98fa6329b1a595b3d3aafbdcad6b
2014-03-24 11:37:06 -07:00
John Reck
ae31664390 am aff40e25: am fc603ca6: am abf701e6: Merge "Eliminate mHasAlpha" into klp-dev
* commit 'aff40e25e8f16c3ecd20376901d7062774850023':
  Eliminate mHasAlpha
2014-03-21 19:53:17 +00:00
John Reck
aff40e25e8 am fc603ca6: am abf701e6: Merge "Eliminate mHasAlpha" into klp-dev
* commit 'fc603ca6b518777a7e4dc391bc771e5609ab3ab5':
  Eliminate mHasAlpha
2014-03-21 19:47:22 +00:00
John Reck
fc603ca6b5 am abf701e6: Merge "Eliminate mHasAlpha" into klp-dev
* commit 'abf701e6751aed487d4ed0986e0fae8810c3658f':
  Eliminate mHasAlpha
2014-03-21 19:41:00 +00:00
John Reck
91f0a455bb Eliminate mHasAlpha
Bug: 13580771

 The cached value mHasAlpha on Bitmap could get out of sync with the
 real value stored in the SkBitmap. Fix this by just eliminating the
 cached value. This adds an extra JNI call in copy(), createBitmap(),
 and setPremultiplied(), none of which are going to be significantly
 impacted by the extra JNI call.

Change-Id: I4fce069a77d9b3bbb47dde04275ff8510ce7e4f0
2014-03-21 18:16:18 +00:00
Dan Stoza
72191f3dc1 Merge "Remove deprecated BufferQueue constructor" 2014-03-18 16:55:57 +00:00
Ben Murdoch
c4c484c6a7 am e9529bc4: am d292aac5: am 889a1ddd: Fix JavaDoc
* commit 'e9529bc4cb28176fddf1e7916c7791e5974f2fc3':
  Fix JavaDoc
2014-03-17 23:32:25 +00:00
Doug Zongker
f168e4c46c resolved conflicts for merge of a1ca303a to master
Change-Id: I37ef6102fd79e396fa3e50d6c012a667488a306d
2014-03-17 16:24:30 -07:00
Ben Murdoch
d292aac5eb am 889a1ddd: Fix JavaDoc
* commit '889a1ddd00b74933d5f7daa651d98133bcb034ba':
  Fix JavaDoc
2014-03-17 19:34:12 +00:00
Ben Murdoch
889a1ddd00 Fix JavaDoc
Change-Id: I20d0b1544ba88c694b950ef6062f93c65b16d371
2014-03-17 19:20:43 +00:00
Torne (Richard Coles)
966bfa8df4 am 01252217: Merge "Fix javadoc." into klp-modular-dev
* commit '01252217a5d779c885645028a5df70215e7be4f4':
  Fix javadoc.
2014-03-17 18:02:10 +00:00
Torne (Richard Coles)
5aa9c5a77b Fix javadoc.
Fix javadoc reference missing a #

Bug: 13246311
Change-Id: Ifc06234943339250feb5b4f2077af03c35be076e
2014-03-17 17:51:40 +00:00
Leon Scroggins III
96978ee290 am f8d8777d: Update framework to use M33 Skia. DO NOT MERGE
* commit 'f8d8777dddf91c741981b4f795f2fb2b1d81c1b6':
  Update framework to use M33 Skia. DO NOT MERGE
2014-03-17 15:55:43 +00:00
Leon Scroggins III
f8d8777ddd Update framework to use M33 Skia. DO NOT MERGE
(These CLs are already in master.)

Bug: 13246311

This cherry-picks 7 CLs:

-----------------------------------------------------------------------

Remove calls to deprecated SkBitmap::setIsOpaque()

setIsOpaque() has been removed from ToT Skia.

Update setters for mIsPremultiplied and hasAlpha to take the
other into consideration.

cherry-pick from: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a

-----------------------------------------------------------------------

Merge AssetStream with AssetStreamAdaptor.

Add enums to the constructor for AssetStreamAdaptor to choose the
different behaviors used by the (former) two different classes.

The old clients of AssetStream now get the following features of
AssetStreamAdaptor
- Debugging statements on error.
- The stream is an SkStreamRewindable.
- getLength() returns the correct value, and the old way of getting
  the length (read(NULL, 0)) is no longer implemented, since it is
  no longer used.
- isAtEnd() returns the correct value. ToT Skia makes it pure virtual,
  so some implementation is necessary.

cherry-pick from: I2a5395914e4f53830aaefee396556459083a1c56

-----------------------------------------------------------------------

Deprecate Android-specific SkPaint functions.

The following functions were problematic:
 const SkGlyph& getUnicharMetrics(SkUnichar, const SkMatrix*);
 const SkGlyph& getGlyphMetrics(uint16_t, const SkMatrix*);
 const void* findImage(const SkGlyph&, const SkMatrix*);

Replacing them with calls through SkGlyphCache solved a nasty crash
bug, so they have all been deprecated.

Bug: 11968757
cherry-pick from: Id746315d41aec5b211b78b172a883c2061130f08

-----------------------------------------------------------------------

pass SkGlyphCache into updateGlyphCache()

Doing so prevents us from double-locking the glyph cache, thereby
effectively locking ourselves out of reusing work that we'd just done.

Bug: 11968757
cherry-pick from: I5c552f2d0bbe30af2ce9054ba684e7da756a0d89

-----------------------------------------------------------------------

Updates to the Skia API needed to merge the WebView m33 version of Skia.

cherry-pick from: I0f63b53f2aae58871413b132742fc84138f069a3

Bugfix for screenshots (recent apps) due to incorrect rowBytes computation

bug: 12915192
cherry-pick from: I4d5fe2a2f75baf66099e0970fb646686a1992714

-----------------------------------------------------------------------

Fix bug in AndroidPixelRef where we did not store the correct imageInfo for a recycled bitmap.

cherry-pick from: I882483b78886e2f19fa4e43a86e69f5a82b3b7e5

-----------------------------------------------------------------------

Change-Id: Ie2b731a9f0795802418cfecddb4b684c92c64d33

Conflicts:
	core/jni/android/graphics/Bitmap.cpp
	core/jni/android/graphics/Graphics.cpp
	core/jni/android/graphics/Typeface.cpp
	graphics/java/android/graphics/Bitmap.java
2014-03-17 13:57:18 +00:00
Jason Sams
0ebc6b378d Force merge of remaining KLP changes to fix build.
Change-Id: I389a23c6615663c325980fcb30350ea6635d2d17
2014-03-13 01:49:05 -07:00
Jason Sams
fc15f899b8 Fix build issues from bad merge
Change-Id: I6ebac7c87b807a8ed2fbeac895c1db8b199f715a
2014-03-13 01:17:49 -07:00
Jason Sams
632c915ce8 resolved conflicts for merge of 780d57b8 to klp-modular-dev
Change-Id: Idf2f939c25c342fff98da6b83be875d7708deba0
2014-03-13 07:40:24 +00:00
Jason Sams
280db65032 am e14d5e90: am 5757bf89: Add hidden minor version ID for support lib workarounds.
* commit 'e14d5e901172559a5e18077bde3ccafd03e8a6e2':
  Add hidden minor version ID for support lib workarounds.
2014-03-13 01:35:42 +00:00
Dan Stoza
0dc146be5a Remove deprecated BufferQueue constructor
Bug: 13415624
Change-Id: Ib9788bca98fca22e0e4d81756d4aa3b29d5d5af2
2014-03-12 15:39:33 -07:00
Alan Viverette
ba346f9d8d Unify touch feedback drawable and reveal drawable
BUG: 13030730
Change-Id: I65a50a00bd76b80bb242b1573b89e443e2e143fe
2014-03-10 19:09:28 -07:00
Jason Sams
780d57b81a am cf8573c1: Fix destruction issues relating to AllocationAdapter.
* commit 'cf8573c15456c4581b691c7380722ea6dccf11c5':
  Fix destruction issues relating to AllocationAdapter.
2014-03-11 01:12:32 +00:00
Jason Sams
e14d5e9011 am 5757bf89: Add hidden minor version ID for support lib workarounds.
* commit '5757bf89c44e7a4805340b5634bec13a1caf39f8':
  Add hidden minor version ID for support lib workarounds.
2014-03-11 01:12:29 +00:00
Jason Sams
0165db3802 am ff7256e7: Fix destruction issues relating to AllocationAdapter.
* commit 'ff7256e757502279b1777127a12eba235be679ae':
  Fix destruction issues relating to AllocationAdapter.
2014-03-11 01:12:23 +00:00
Jason Sams
cf8573c154 Fix destruction issues relating to AllocationAdapter.
bug 13170046

Change-Id: I2a2ba3cbd7d08c659ed8958fbcc01919e36e86b0
2014-03-10 13:32:42 -07:00
Jason Sams
5757bf89c4 Add hidden minor version ID for support lib workarounds.
bug 13170046

Change-Id: I0c77901752e9a0b10bd5be62311c79a0ab7128e5
2014-03-10 13:32:21 -07:00
Jason Sams
ff7256e757 Fix destruction issues relating to AllocationAdapter.
bug 13170046

Change-Id: I922b19c086b675949c6fae66c6dcb4c8af3b715f
2014-03-10 13:31:51 -07:00
Leon Scroggins III
87e9e744ed am 92a32832: DO NOT MERGE - Fix Javadoc build break.
* commit '92a3283286df3a6c2a27ecde8eddf23abbb87de9':
  DO NOT MERGE - Fix Javadoc build break.
2014-03-06 21:31:31 +00:00
Leon Scroggins III
92a3283286 DO NOT MERGE - Fix Javadoc build break.
Remove links to non-specific function name.

Bug: 13246311

Change-Id: I5643074149d0a511bd760d638751c44e3ec4c557
(cherry picked from commit 2bc49ca96eb786f66dc2b9573e1f09bdb2d82d5e)
2014-03-06 20:44:16 +00:00
Leon Scroggins III
8d3281f5f7 am ee008d42: Merge "Update framework to use M33 Skia. DO NOT MERGE" into klp-dev
* commit 'ee008d4264a95bba5f90b17856fc06fa29a6f12c':
  Update framework to use M33 Skia. DO NOT MERGE
2014-03-06 19:49:58 +00:00
Leon Scroggins III
5e49b497ae Update framework to use M33 Skia. DO NOT MERGE
(These CLs are already in master.)

Bug: 13246311

This cherry-picks 7 CLs:

-----------------------------------------------------------------------

Remove calls to deprecated SkBitmap::setIsOpaque()

setIsOpaque() has been removed from ToT Skia.

Update setters for mIsPremultiplied and hasAlpha to take the
other into consideration.

cherry-pick from: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a

-----------------------------------------------------------------------

Merge AssetStream with AssetStreamAdaptor.

Add enums to the constructor for AssetStreamAdaptor to choose the
different behaviors used by the (former) two different classes.

The old clients of AssetStream now get the following features of
AssetStreamAdaptor
- Debugging statements on error.
- The stream is an SkStreamRewindable.
- getLength() returns the correct value, and the old way of getting
  the length (read(NULL, 0)) is no longer implemented, since it is
  no longer used.
- isAtEnd() returns the correct value. ToT Skia makes it pure virtual,
  so some implementation is necessary.

cherry-pick from: I2a5395914e4f53830aaefee396556459083a1c56

-----------------------------------------------------------------------

Deprecate Android-specific SkPaint functions.

The following functions were problematic:
 const SkGlyph& getUnicharMetrics(SkUnichar, const SkMatrix*);
 const SkGlyph& getGlyphMetrics(uint16_t, const SkMatrix*);
 const void* findImage(const SkGlyph&, const SkMatrix*);

Replacing them with calls through SkGlyphCache solved a nasty crash
bug, so they have all been deprecated.

Bug: 11968757
cherry-pick from: Id746315d41aec5b211b78b172a883c2061130f08

-----------------------------------------------------------------------

pass SkGlyphCache into updateGlyphCache()

Doing so prevents us from double-locking the glyph cache, thereby
effectively locking ourselves out of reusing work that we'd just done.

Bug: 11968757
cherry-pick from: I5c552f2d0bbe30af2ce9054ba684e7da756a0d89

-----------------------------------------------------------------------

Updates to the Skia API needed to merge the WebView m33 version of Skia.

cherry-pick from: I0f63b53f2aae58871413b132742fc84138f069a3

Bugfix for screenshots (recent apps) due to incorrect rowBytes computation

bug: 12915192
cherry-pick from: I4d5fe2a2f75baf66099e0970fb646686a1992714

-----------------------------------------------------------------------

Fix bug in AndroidPixelRef where we did not store the correct imageInfo for a recycled bitmap.

cherry-pick from: I882483b78886e2f19fa4e43a86e69f5a82b3b7e5

-----------------------------------------------------------------------

Change-Id: Ie2b731a9f0795802418cfecddb4b684c92c64d33
2014-03-06 12:14:47 -05:00