1683 Commits

Author SHA1 Message Date
Alan Viverette
70802d2501 Fix VectorDrawable states
BUG: 14083130
Change-Id: I8242523d9a4acd499154d2e7b9b9b52a3f1f742d
2014-04-16 16:58:58 -07:00
Alan Viverette
d20974bd51 Clean up VectorDrawable formatting
Change-Id: I9110f6ddeda9a811e466e58e451fa95eca08e72e
2014-04-16 16:24:00 -07:00
Alan Viverette
4554a6a513 Implement jumpToCurrentState() in VectorDrawable
BUG: 14083130
Change-Id: Ie1842b2367d1f24d18fdbc71963e077a1805de9b
2014-04-15 15:53:01 -07:00
ztenghui
175f3c892c Make sure control points are in absolute coordinates
Change-Id: I1b90fe39f9dc77e1a1b7b4b512cd11f5734fbf8f
2014-04-11 15:59:15 -07:00
Alan Viverette
d30688f0a0 Fix support for TouchFeedbackDrawable tint mode
Change-Id: I86bff1c5e69d9a193deb52559948b20ddca99751
2014-04-10 19:27:58 -07:00
ztenghui
8a5c99c9e9 Merge "Fix path interpretation on curves" 2014-04-10 22:40:35 +00:00
Alan Viverette
4b1a7c203d Fix build breakage
Change-Id: I73d9ff5f38986b7acf83b85c1989203f472bc5fd
2014-04-10 14:28:30 -07:00
Alan Viverette
4b3988d159 Cleaning up VectorDrawable
Use argb evaluation method from animation package, lazily create paint,
set default for stroke line cap and join. Fix scaling to bounds. Fix
drawable in test app.

Change-Id: I245d5d6acc6ba9806743ab2bf9bf99aff3649c39
2014-04-10 11:21:15 -07:00
ztenghui
33ed52eff4 Fix path interpretation on curves
Mostly about the shorthand for quadratic / cubic curve.

We now comply with the spec, which said the behavior should depend on the
previous command.
At the same time, make sure our current point and current control point info
are always in absolute coordinates, not a mix of absolute and relative.
CTS test will be added to monitor this behavior.

Note: Chrome / Firefox are following this rule, while Linux OS / Batik are not.

bug:13913405

Change-Id: I9f8168ed97f87c754c79588984f1f199507b0377
2014-04-09 15:11:40 -07:00
Alan Viverette
514d4aaf53 Merge "Update supported Drawable tinting modes and docs" 2014-04-09 20:08:46 +00:00
Alan Viverette
2f8ba8f7fa Update supported Drawable tinting modes and docs
Change-Id: I9c20d2bc4dc499f91c21a348871cf209c1065ba6
2014-04-09 13:00:17 -07:00
Alan Viverette
7f1ab7a43f Theming for more VectorDrawable attrs, add attrs to test app
BUG: 13878079
Change-Id: Ibcc8d67446c44cd8f681230fc484c7dc7411ffab
2014-04-08 17:12:43 -07:00
Alan Viverette
860126b78a Make Drawable hotspot APIs public
Change-Id: I8377ed735f73f7083636947aa08a5427f1dc3bf6
2014-04-08 16:37:19 -07:00
Alan Viverette
5c981a100e Fix some vector drawable documentation, clean up fields
Change-Id: Iade0323b0ec2d3f8b609f24d89252608dfe40735
2014-04-08 13:35:49 -07:00
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