2083 Commits

Author SHA1 Message Date
Jason Sams
24bea6a3ef Resolve conflicts with AOSP.
Change-Id: I2f1afdb83dcfc9078df5d3c2f13abacb6504d73d
2014-07-02 14:32:24 -07:00
Nick Kralevich
77491ac00c Merge "Correct typo in doc comment" 2014-07-02 20:52:43 +00:00
Alan Viverette
c054966b71 Make optical insets actually work
Change-Id: I9fabf4cb939cc7a868f95580e7229745acde0418
2014-07-04 01:10:38 +00:00
Leon Scroggins III
57ee620ced Read premultiplied status from the SkBitmap.
Replace the Java variable with mRequestPremultiplied, to better
reflect what it represents. In both native and Java, the SkBitmap
is used as the decision maker of whether a Bitmap is premultiplied.
When changing other settings, mRequestedPremultiplied is used to
determine whether it should be premultiplied (if the new config/
hasAlpha-ness etc supports it).

ChooseFromColorProc now reads both the colortype (instead of the
deprecated Config) and alphatype on the SkBitmap. Same with
ChooseToColorProc. In the process, this caught a bug, where the
wrong procs were being used for Index8.

Replace instances of SkBitmap::Config with SkColorType where I
was already changing code.

Use the new versions of setConfig/allocPixels that take an SkImageInfo
as a parameter.

Document isPremultiplied's return value for ALPHA_8.

BUG:13618134
Change-Id: I91fc1f1e46e9294364b1af0ab4bdb37c68d7058e
2014-07-01 14:05:37 -04:00
Chris Craik
9a347f1992 Initial replacement of setOutline() with ViewOutlineProvider API
bug:15283203

A View's outline is now managed by its outline provider. This means
the outline is automatically requeried when needed (e.g. drawable
updates or resize), with customizable querying behavior.

Also adds 'isFilled' property to outline, to be used for hinting
shadow overdraw avoidance.

Change-Id: Ie137548fa850f1ff7863ab2f660d05145c2ad11e
2014-07-01 00:16:25 +00:00
ztenghui
9e31cfa92c Merge "Use AnimatedVectorDrawable for progress bar." 2014-06-30 14:43:31 +00:00
ztenghui
9cb5b4c2d9 Use AnimatedVectorDrawable for progress bar.
Change-Id: I419197ef38a611757f27ca3192350ad4bd403875
2014-06-30 12:43:52 -07:00
Alan Viverette
6ae2d7cefa Don't call deprecated RippleDrawable constructor
BUG: 15972806
Change-Id: If0973eed2da4708312a1320be4dd0b314157bc9a
2014-06-30 11:34:21 -07:00
Chris Craik
3e1585e05d Add outline support to InsetDrawable
bug:15933107
Change-Id: I3341417dc197a751442d2b4c2645a1520db41095
2014-06-30 17:53:05 +00:00
Alan Viverette
9550acf1e9 Merge "Require color in RippleDrawable constructor, fix documentation" 2014-06-27 16:52:20 +00:00
Alan Viverette
7275abde37 Require color in RippleDrawable constructor, fix documentation
Marks old constructor for removal and emits LOG_E when used.

BUG: 15808263
Change-Id: Iae4f3237261541cb04f42343351b3fc0ac4929ac
2014-06-27 14:34:54 -07:00
Alan Viverette
100a2d1fc6 Clean up AnimationDrawable.setVisible() state management
BUG: 15823683
Change-Id: Ied0d476956c246bdfda66219aaa896f2ef58f0bd
2014-06-27 13:15:14 -07:00
Dan Stoza
493f2e1190 SurfaceTexture: Allow creation in detached mode
Adds a constructor that doesn't require a GLES texture name and sets
up the SurfaceTexture in detached mode.

Bug: 15616428
Change-Id: I375495f481bfbe43b3830ab7d124cef8f1be0ac6
2014-06-26 13:36:19 -07:00
Raph Levien
3660789f06 Switch all text layout to Minikin
This patch switches all text layout operations to use Minikin, removes
the USE_MINIKIN #ifdef, and deletes some of the code that was only used
in the old TextLayout path (although some more refactoring remains).

Change-Id: I51b5c4e2bb46cfd9d204c12b9f16f135c769f5b5
2014-06-26 08:23:48 -07:00
Raph Levien
d194262f53 Delete Paint.getTextGlyphs()
The Paint.getTextGlyphs() method was used for testing the old Arabic
shaper and is entirely obsolete. Note that this is the very last
dependency (other than some enums in the header) for the old TextLayout
code path.

Change-Id: I7b596f0c0942ed50987fc8e0478cd93e667f1f9e
2014-06-26 15:15:28 +00:00
Chris Craik
58945975b2 Outline support in DrawableContainer and LayerDrawable
bug:14445484
Change-Id: I26a45b0115b976d0dbcc351a208dc0956bc52e96
2014-06-24 15:56:05 -07:00
Alan Viverette
22594f0972 Add tileModeX/Y attrs to BitmapDrawable, tint to ShapeDrawable
Change-Id: I1c9efe39bfd5286230cee8354822db81f05186e4
2014-06-23 12:47:43 -07:00
ztenghui
f2d0020d93 Merge "Make AnimatedVectorDrawable public." 2014-06-20 20:04:02 +00:00
ztenghui
7e7ea9da67 Make AnimatedVectorDrawable public.
Clean up some useless VectorDrawable functions.
Add comments, too.

Change-Id: I8cc2165d14d09fd71f5830c4f61f9e8ac1d7c8da
2014-06-23 09:36:52 -07:00
ztenghui
eb034fbca4 AVD now support path morphing.
Basically extended the ValueAnimator to support a new type: pathType.
Add the PathDataEvaluator internally to interpolate path data.
Update test to show the path morphing.

Change-Id: I89db0199cbc12e3041790a6115f3f50b80213cdb
2014-06-20 15:16:47 -07:00
Chet Haase
3aff2a0813 Avoid resetting gradient state when not actually rebuilding it
Previous logic in GradientDrawable around rebuilding the gradient path
was incorrect, but it happened to work because of when it was called
(after ensureValidRect() in the draw() method). Further reliance on this
logic outside of the drawing cycle (in the new getOutline() method) caused
the side-effect to surface as we now clear the dirty flag without actually
rebuilding the gradient.

Fix avoids resetting the flag outside of ensureValidRect() where it belongs.

Issue #15508378 Quantum ui having issues with viewing comments on facebook app

Change-Id: Ia944d3de7e3c0920fed040188e8c1cc1bcce498d
2014-06-21 08:31:03 -07:00
ztenghui
02aefd779e Merge "AVD now support path morphing." 2014-06-20 02:09:17 +00:00
Alan Viverette
9cd14fc710 Add support for tint attribute in VectorDrawable
Fixes NPE from previous change. Also fixes docs reference in TypedArray.

BUG: 15375203
Change-Id: Icf3b5759780276b0875a4fb70b29522ab7c8cb90
2014-06-20 14:45:11 -07:00
Dianne Hackborn
5ff885cd3b Revert "Add support for tint attribute in VectorDrawable"
This reverts commit ab41ea17e6b0407fa76bc9f9183190a9bbc7f560.

Was causing system UI to crash.
2014-06-19 23:02:37 -07:00
Alan Viverette
e93c90126b Merge "Add support for tint attribute in VectorDrawable" 2014-06-20 00:06:01 +00:00
Alan Viverette
9a77cb92da Add support for tint attribute in VectorDrawable
Also fixes docs reference in TypedArray.

BUG: 15375203
Change-Id: I8cd2f43bd73f50084e21e5b986af9dc1c1447ad6
2014-06-19 17:16:17 -07:00
Alan Viverette
07c661e677 Put dither in GradientDrawable constant state
Previously the dither attribute would be dropped when cloning a
gradient drawable from constant state. Also fixes ShapeDrawable
theme extraction.

BUG: 15754194
Change-Id: I3071f5b8236cfa6acb549627a3dfac0618518dbf
2014-06-19 16:15:53 -07:00
Raph Levien
580ecd4b2b Merge "Simple implementation of drawPosText" 2014-06-19 14:48:39 +00:00
Raph Levien
3f0d616722 Simple implementation of drawPosText
The existing implementation of drawPosText is broken in various subtle
ways, in any case doesn't work with Minikin. This patch just implements
it by drawing a separate run for each Unicode character, which should
have the least surprising results for complex scripts such as Khmer.

Part of b/11750374 Resolve TODO items for Minikin

Change-Id: I874ae3c163f0cbe3cdf0160564fab04305aed5aa
2014-06-19 11:22:45 -07:00
ztenghui
cf4832f69c Add path support into xml files for PathInterpolator and ObjectAnimator.
The test case is showing that AnimatedVectorDrawable is able to use path to
define time interpolator and object movement now.

Change-Id: If3c0418265d0fd762c8f5f0bb8c39cce3ad34ef3
2014-06-19 10:56:28 -07:00
Alan Viverette
88dc8f1e41 Merge "Fix clamped starting position, seek bar hotspot bounds" 2014-06-18 18:28:24 +00:00
Alan Viverette
304624100b Fix clamped starting position, seek bar hotspot bounds
BUG: 15720430
Change-Id: I11d40c747ea1a3665e9e2058d95dda1bc8a547ab
2014-06-18 17:54:58 -07:00
Alan Viverette
8de1494557 Fix switch & slider anim, make View drawable hotspot API public
BUG: 15287810
Change-Id: Ic7a9549dc1ba8afd07e9a196371ed349a54aaf2f
2014-06-18 18:05:15 -07:00
Alan Viverette
e3c433aa45 Persist selector on ListView and GridView layout
BUG: 15472031
Change-Id: I0d10be3e0cf8a4d7580bd834e432c1c15fc481f5
2014-06-19 14:36:59 -07:00
ztenghui
b9db146d0d Merge "Improve constant state for VectorDrawable" 2014-06-17 21:43:29 +00:00
ztenghui
16c1bd5db8 Improve constant state for VectorDrawable
Now inflation will not cause duplicated constant states.
    And update tests.

Change-Id: I66861e5451c4c10d18756e8522546ea1cb938a55
2014-06-18 12:55:22 -07:00
Alan Viverette
5adf8ee451 Fix bitmap tinting
BUG: 15716407
Change-Id: I4008c9763fedc2f716040cd3f73ad79d77343960
2014-06-18 17:58:35 +00:00
Raph Levien
c802c8cda2 Merge "Implement drawTextOnPath with Minikin" 2014-06-17 21:46:58 +00:00
Raph Levien
9d2b5e1930 Implement drawTextOnPath with Minikin
This patch contains an implementation of drawTextOnPath for both
software and hardware Canvas using Minikin for text layout. One of the
steps for switching all remaining text operations to Minikin so the old
TextLayout and Skia fallback fonts mechanisms can be deleted.

Bug: 11750374 Resolve TODO items for Minikin
Change-Id: I06bfe74a101fa1dcdfc38f530f7194d71e522a85
2014-06-18 11:04:24 -07:00
Derek Sollenberger
bc8bd76bc7 Merge "Refactor android.graphics.Picture JNI bindings." 2014-06-17 21:13:21 +00:00
Alan Viverette
911743652b Add attributes and accessors for tinting View drawables
Also cleans up handling in setters for managed drawables.

BUG: 15391544
Change-Id: Idc08f7eaea0050feb6403566985a6d58185b81f8
2014-06-17 14:51:45 -07:00
Antonio Calabrese
2460958133 Added primitive parameters to various functions requiring rectangles.
Change-Id: I5a2678fa989f0ff34404b8236787a8153b05f113

bug:14322352
2014-06-17 20:17:59 +00:00
Derek Sollenberger
4b0959d8db Refactor android.graphics.Picture JNI bindings.
This is the first CL in a series of CLs to refactor the Graphics JNI bindings.

bug: 15672762
Change-Id: I1455fa1330c7426407c06eeaad81ad37a57373b1
2014-06-17 15:31:43 -04:00
Anish Athalye
a4649d95fe Merge "Implement Paint.breakText() using Minikin" 2014-06-17 04:50:03 +00:00
Anish Athalye
a7aa1b0aa5 Implement Paint.breakText() using Minikin
Change-Id: I36cee2d840ce1bd24a9a06f0c680880396b7398a
2014-06-17 00:31:19 +00:00
Raph Levien
466cd7a2a6 Merge "Clean up dirFlags / bidiFlags confusion" 2014-06-16 22:12:26 +00:00
Raph Levien
051910b9f9 Clean up dirFlags / bidiFlags confusion
The dirFlags and bidiFlags enums are distinct, and have different
meanings. The former is a determined direction for a run of text, while
the latter is a request for the bidi algorithm. They have been used
interchangeably, and this has caused some problems, notably running the
bidi algorithm needlessly when the direction for a run is already
determined.

This patch cleans up the confusion, by always naming each occurrence
explicitly "boolean isRtl" or "int bidiFlags" (the previous code often
just used "int flags", which added to the confusion), and converts
between the meanings when a function takes an isRtl argument but passes
it to another function expecting bidiFlags.

Fixes b/15089607 Clean up bidi flag mess

Change-Id: I410b6604376e853dd12c255e7f5a9d2b9a310dd9
2014-06-16 14:36:08 -07:00
Alan Viverette
a2992f44bc Fix tint filters in NinePatchDrawable and ShapeDrawable
BUG: 15678325
Change-Id: I57066e7a44498c88a270c76b7880f36825a25bb8
2014-06-16 18:34:04 -07:00
Alan Viverette
611c1ff0de Fix ShapeDrawable constant state and theming
Change-Id: I085d7705b63ec5f94e9b9fb5ece85ae3c7d39512
2014-06-16 14:43:27 -07:00
Alan Viverette
b3c56086d8 Add support for setTint in all Drawables, clean up lint warnings
Change-Id: I962089ca59684cef28cb4a648d4a91e542bdf5d4
2014-06-16 11:00:24 -07:00