1958 Commits

Author SHA1 Message Date
ztenghui
63cfd85bcc Move the rotation information from path to group.
Also update the 3rd test to correctly testing clipping.

Removing some naive tests which rotate 360 or 0.

bug:15288554

Change-Id: I436e8e494cb78fc665a3890171a1af87367db419
2014-05-28 09:31:19 -07:00
Deepanshu Gupta
baef8c1ffe Layoutlib fixes for L [DO NOT MERGE]
This adds the new delegates that were missing. This starts the work on
changes related to Minikin Fonts.

There are some changes related to TypedArray that still need to be
fixed.

Change-Id: Ic2397b64aa3f1f48926e849b14689c47d9ee7f8c
(cherry picked from commit 7ca3612094270183243938e79337c84effea7ad0)
2014-05-27 18:01:34 -07:00
Deepanshu Gupta
b00cb8b8c7 Merge "Layoutlib fixes for L" 2014-05-27 21:18:04 +00:00
ztenghui
bd67759a3d Merge "Bring the group tag back to VectorDrawable." 2014-05-27 20:08:23 +00:00
ztenghui
6d9c422de5 Bring the group tag back to VectorDrawable.
This is the first step, including:
1. Bring the group tag back by reverting.
2. If there is no group tag, then treat all the paths as a single group.
Make sure our test cases covering both cases.

At the same time, fix one tiny UI bug in the test.

TODO:
1. Move the rotation to the group tag.
2. Add translation/scale to the group tag.
3. Convert the group into a tree hierarchy.

This reverts commit 404211630ba3bb865109434aba4433e7541b39d3.

Conflicts:
	graphics/java/android/graphics/drawable/VectorDrawable.java

Change-Id: Ife65bb6a7fc85f9947124b8e356cd5b82119796a
2014-05-27 10:15:52 -07:00
ztenghui
427a15a0f0 Merge "DO NOT MERGE: Hide the VectorDrawable" into lmp-preview-dev 2014-05-27 16:09:05 +00:00
Chris Craik
cd3a824548 Merge "DO NOT MERGE Inspect SkShader to determine hw shader." into lmp-preview-dev 2014-05-23 23:21:49 +00:00
ztenghui
72da163821 DO NOT MERGE: Hide the VectorDrawable
Change-Id: Ie65194c8ec54063f48a541ee0cc82bccc41f5353
2014-05-23 16:08:36 -07:00
Alan Viverette
0ff33fba40 am a8b23365: Merge "Add support for setColorFilter in VectorDrawable" into lmp-preview-dev
* commit 'a8b2336554daef1cf299ef0cbb6c51981a1e719f':
  Add support for setColorFilter in VectorDrawable
2014-05-23 21:22:50 +00:00
Alan Viverette
d6405c1c75 Merge "Add support for setColorFilter in VectorDrawable" into lmp-preview-dev 2014-05-23 21:20:45 +00:00
Alan Viverette
8c1244b98c Merge "Fix build." 2014-05-23 18:10:36 +00:00
Alan Viverette
d30241541c DO NOT MERGE Fix build.
Change-Id: I2e9f7f27c94b9f9240a5ca76952024055ff79878
2014-05-23 11:10:12 -07:00
Alan Viverette
7bf1eb63ec Fix build.
Change-Id: I2e9f7f27c94b9f9240a5ca76952024055ff79878
2014-05-23 11:09:51 -07:00
Alan Viverette
de220369c6 am e11794a2: Merge "Update switch, checkbox, radio button, button, and toggle button" into lmp-preview-dev
* commit 'e11794a2c1af70a265b6476ce3f3587814e9f0b3':
  Update switch, checkbox, radio button, button, and toggle button
2014-05-23 17:36:23 +00:00
Alan Viverette
fd6e411767 Add support for setColorFilter in VectorDrawable
Also cleans up inflation so that we can apply themes more easily.

Change-Id: I56decb29fe987286a38fc0aa96f95952cf67c120
2014-05-23 10:29:37 -07:00
Leon Scroggins III
0fa2bd699a DO NOT MERGE Inspect SkShader to determine hw shader.
cherry-pick of Iaa7189178bda1c55f96da044d2a9fa602ba36034

Instead of duplicating internal info about SkShader, inspect the
SkShader installed on the SkPaint.

core/java/android/view/GLES20Canvas.java:
Remove setupModifiers, nResetModifiers, and nSetupShader.

core/jni/android/graphics/Shader.cpp:
Remove calls to create/destroy the (previously) attached SkiaShader.

core/jni/android_view_GLES20Canvas.cpp:
Remove native code for setupShader and resetModifiers.

graphics/java/android/graphics/BitmapShader.java:
graphics/java/android/graphics/ComposeShader.java:
graphics/java/android/graphics/LinearGradient.java:
graphics/java/android/graphics/RadialGradient.java:
graphics/java/android/graphics/Shader.java:
graphics/java/android/graphics/SweepGradient.java:
Remove code keeping track of native SkiaShader.

libs/hwui/Caches.h:
Include Extensions.h.

libs/hwui/DeferredDisplayList.cpp:
Compare shaders on the paint, instead of on DrawModifiers.

libs/hwui/DisplayList.cpp:
libs/hwui/DisplayList.h:
Remove vector of SkiaShaders.

libs/hwui/DisplayListOp.h:
Access the SkShader on mPaint.
Remove SetupShaderOp and ResetShaderOp.

libs/hwui/DisplayListRenderer.cpp:
libs/hwui/DisplayListRenderer.h:
Remove resetShader, setupShader, refShader, and mShaderMap.

libs/hwui/FontRenderer.cpp:
Pass SkShader to setupDrawShader and setupDrawShaderUniforms.

libs/hwui/OpenGLRenderer.cpp:
libs/hwui/OpenGLRenderer.h:
Add LayerShader, a class inheriting from SkShader, to mimic the
behavior of SkiaLayerShader. Unlike SkiaLayerShader, it can be set on
the SkPaint so it can be inspected later.
Set a LayerShader instead of a SkiaLayerShader.
setupDrawShader and setupDrawShaderUniforms now inspect an SkShader
passed in.
Inspect SkShader instead of mDrawModifiers.mShader.
Remove resetShader and setupShader.
setupDrawColorUniforms now takes a boolean indicating whether there is
a shader.
Add an inline function for accessing the SkShader on an SkPaint.
In setupDrawBlending(Layer*, bool), do not check the shader (which will
never be set), but do check whether the color filter may change the
alpha (newly fixed behavior).
In setupDrawBlending(SkPaint, ...), check the SkShader and whether the
color filter affects alpha (the latter is new behavior).

libs/hwui/Renderer.h:
Remove pure virtual functions setupShader and resetShader.

libs/hwui/ResourceCache.cpp:
libs/hwui/ResourceCache.h:
Remove functions for refing/unrefing shaders.

libs/hwui/SkiaShader.cpp:
libs/hwui/SkiaShader.h:
Much of this code was redundant and has been removed.
Convert structs into class with nothing but static functions for
calling describe/setupProgram.

libs/hwui/TextureCache.cpp:
libs/hwui/TextureCache.h:
Use the SkPixelRef as the key to the bitmap Lru cache, since shader
inspection will provide a different SkBitmap pointer (though it will
hold the correct SkPixelRef with the correct generation ID).

tests/CanvasCompare/src/com/android/test/hwuicompare/DisplayModifier.java:
tests/CanvasCompare/src/com/android/test/hwuicompare/ResourceModifiers.java:
Update manual test to have more shaders: radial, sweep, compose,
invalid compose.

BUG:10650594
Change-Id: I2e7182b3fc28268e7ca82fac6780540b6b45365c
2014-05-23 11:50:38 -04:00
Alan Viverette
2356c5e69b Update switch, checkbox, radio button, button, and toggle button
Add optical inset support to BitmapDrawable with gravity. Fix optical
inset support in DrawableContainer. Fix visibility change support in
AnimatedStateListDrawable. Adds a whole bunch of missing drawable
support to CheckedTextView.

BUG: 15127013
BUG: 15126976
BUG: 15125529
BUG: 15025806
BUG: 14597955
BUG: 14594498
BUG: 15152746
Change-Id: Id2d99e10838d25b6f927ca1e49996c8da8e78ab1
2014-05-22 22:43:59 -07:00
Chris Craik
d490aa4260 Merge "Inspect SkShader to determine hw shader." 2014-05-23 00:03:46 +00:00
Deepanshu Gupta
130d2353ed Layoutlib fixes for L
This adds the new delegates that were missing. This starts the work on
changes related to Minikin Fonts.

There are some changes related to TypedArray that still need to be
fixed.

Change-Id: Ic2397b64aa3f1f48926e849b14689c47d9ee7f8c
2014-05-22 16:24:10 -07:00
Leon Scroggins III
d1ad5e62fd Inspect SkShader to determine hw shader.
Instead of duplicating internal info about SkShader, inspect the
SkShader installed on the SkPaint.

core/java/android/view/GLES20Canvas.java:
Remove setupModifiers, nResetModifiers, and nSetupShader.

core/jni/android/graphics/Shader.cpp:
Remove calls to create/destroy the (previously) attached SkiaShader.

core/jni/android_view_GLES20Canvas.cpp:
Remove native code for setupShader and resetModifiers.

graphics/java/android/graphics/BitmapShader.java:
graphics/java/android/graphics/ComposeShader.java:
graphics/java/android/graphics/LinearGradient.java:
graphics/java/android/graphics/RadialGradient.java:
graphics/java/android/graphics/Shader.java:
graphics/java/android/graphics/SweepGradient.java:
Remove code keeping track of native SkiaShader.

libs/hwui/Caches.h:
Include Extensions.h.

libs/hwui/DeferredDisplayList.cpp:
Compare shaders on the paint, instead of on DrawModifiers.

libs/hwui/DisplayList.cpp:
libs/hwui/DisplayList.h:
Remove vector of SkiaShaders.

libs/hwui/DisplayListOp.h:
Access the SkShader on mPaint.
Remove SetupShaderOp and ResetShaderOp.

libs/hwui/DisplayListRenderer.cpp:
libs/hwui/DisplayListRenderer.h:
Remove resetShader, setupShader, refShader, and mShaderMap.

libs/hwui/FontRenderer.cpp:
Pass SkShader to setupDrawShader and setupDrawShaderUniforms.

libs/hwui/OpenGLRenderer.cpp:
libs/hwui/OpenGLRenderer.h:
Add LayerShader, a class inheriting from SkShader, to mimic the
behavior of SkiaLayerShader. Unlike SkiaLayerShader, it can be set on
the SkPaint so it can be inspected later.
Set a LayerShader instead of a SkiaLayerShader.
setupDrawShader and setupDrawShaderUniforms now inspect an SkShader
passed in.
Inspect SkShader instead of mDrawModifiers.mShader.
Remove resetShader and setupShader.
setupDrawColorUniforms now takes a boolean indicating whether there is
a shader.
Add an inline function for accessing the SkShader on an SkPaint.
In setupDrawBlending(Layer*, bool), do not check the shader (which will
never be set), but do check whether the color filter may change the
alpha (newly fixed behavior).
In setupDrawBlending(SkPaint, ...), check the SkShader and whether the
color filter affects alpha (the latter is new behavior).

libs/hwui/Renderer.h:
Remove pure virtual functions setupShader and resetShader.

libs/hwui/ResourceCache.cpp:
libs/hwui/ResourceCache.h:
Remove functions for refing/unrefing shaders.

libs/hwui/SkiaShader.cpp:
libs/hwui/SkiaShader.h:
Much of this code was redundant and has been removed.
Convert structs into class with nothing but static functions for
calling describe/setupProgram.

libs/hwui/TextureCache.cpp:
libs/hwui/TextureCache.h:
Use the SkPixelRef as the key to the bitmap Lru cache, since shader
inspection will provide a different SkBitmap pointer (though it will
hold the correct SkPixelRef with the correct generation ID).

tests/CanvasCompare/src/com/android/test/hwuicompare/DisplayModifier.java:
tests/CanvasCompare/src/com/android/test/hwuicompare/ResourceModifiers.java:
Update manual test to have more shaders: radial, sweep, compose,
invalid compose.

BUG:10650594

Change-Id: Iaa7189178bda1c55f96da044d2a9fa602ba36034
2014-05-22 14:46:59 -04:00
Alan Viverette
e7772d313b Move setTint into Drawable, unhide getDirtyBounds on Drawable
BUG: 15089957
Change-Id: Ib622ba24b3f4bcf430e1d524895ac5cb104a232e
2014-05-21 23:50:03 -07:00
Alan Viverette
190dad4317 Merge "Style and asset cleanup" 2014-05-22 01:11:20 +00:00
Alan Viverette
0a1c6f021b Style and asset cleanup
Updates button drawable and colors, cleans up Quantum styles, updates
highlight attribute name and color, fixes popup backgrounds.

Also fixes GradientDrawable opacity check.

Change-Id: I75dd35e815a8a33ec9f0b16e881e774edfb8c092
2014-05-21 18:10:53 -07:00
Chris Craik
b8fe2fcd71 Merge "Define light position (using new lighting spec) in Java" 2014-05-22 00:18:21 +00:00
Alan Viverette
a22aa8806b Merge "Clean up hotspot bounds API" 2014-05-21 23:40:07 +00:00
Alan Viverette
7ec5b2e5a3 Merge "Clean up Gradient drawable theming & whitespace" 2014-05-21 23:34:17 +00:00
Alan Viverette
53a3ed7c46 Clean up hotspot bounds API
Change-Id: I7daf7e2d360d761f673aa69a0f925b8076ab19c6
2014-05-21 15:42:54 -07:00
Alan Viverette
17dafdc8d8 Clean up Gradient drawable theming & whitespace
Change-Id: I66c857a71e5b4beaee6a7e6c04959fbacee3cbe1
2014-05-21 15:32:03 -07:00
Chris Craik
797b95b26b Define light position (using new lighting spec) in Java
Also updates the relative shadow strengths.

Change-Id: I6cac7275d38df98aea9f0dda463cd7207102986a
2014-05-21 13:50:29 -07:00
Svetoslav
95b6fd8b7a Addressing APIs council feedback
bug:15089461

Change-Id: Ifcb003b114e2e50333bb0ef386d99482f7bfaa6e
2014-05-21 13:35:42 -07:00
Chris Craik
47a7d61e70 Merge "Clean up Outline API, method on drawable" 2014-05-20 23:27:21 +00:00
Alan Viverette
3b5c4272db Various API review fixes to resources and drawables
BUG: 15025565
Change-Id: If00c85816f8288338967f7a85453d21f858f5ca7
2014-05-20 13:20:42 -07:00
Alan Viverette
f31512eb17 Merge "Various API council fixes to drawables" 2014-05-20 17:45:52 +00:00
Alan Viverette
e5b082d6eb Various API council fixes to drawables
BUG: 15089957
Change-Id: Ieaf468bbff092e68f6313d8a5ecccda8b753806d
2014-05-20 10:45:22 -07:00
Chris Craik
7dc5b41e60 Clean up Outline API, method on drawable
bug:15025466
bug:15089680
Change-Id: I8d3b64a0d9dbdbaf679042c8b384d2050323a8e6
2014-05-20 10:38:59 -07:00
Alan Viverette
c80ad99a33 TouchFeedbackDrawable is now RippleDrawable
Change-Id: I59f5f04b73089215c6320560556ac21beb03db06
2014-05-19 16:27:31 -07:00
ztenghui
77bc0a17e8 Merge "Remove the versionCode" 2014-05-19 22:13:36 +00:00
ztenghui
e3c45e7a6b Remove the versionCode
Change-Id: I2a77fefd7b14fd3bef0b0c7a142fe88e69883c75
2014-05-19 13:22:10 -07:00
Alan Viverette
ad2f8e334f Update ripple behavior, use render thread animation
Change-Id: Ib6bc1e08b05d29606f452961963d58b8fc866746
2014-05-16 13:28:33 -07:00
Chris Craik
c9ee304c91 Merge "Round rect outline clipping" 2014-05-16 00:37:29 +00:00
Chris Craik
deeda3d337 Round rect outline clipping
Change-Id: Iee9cf4f719f6f1917507b69189ad114fa365917b
2014-05-15 16:36:12 -07:00
Alan Viverette
1dfa9d98be Merge "Simplify attribute extraction for themed Drawables" 2014-05-15 20:58:59 +00:00
Mike Reed
ca2624122c Merge "document and deprecated Rasterizer" 2014-05-15 20:38:44 +00:00
Svetoslav
dbef65f1a1 Merge "Adding APIs to render PDF documents." 2014-05-15 20:15:06 +00:00
Igor Murashkin
25f9a3cd27 Merge "camera2: Use StreamConfigurationMap for format/size/duration lookup" 2014-05-15 16:51:26 +00:00
Raph Levien
091d1ea18a Merge "Add fallback fonts to system fonts (Minikin)" 2014-05-15 02:04:17 +00:00
Raph Levien
9e2b288ba8 Merge "Proper refcounting for Minikin objects" 2014-05-15 02:03:48 +00:00
Raph Levien
018646adac Merge "Parsing of XML font configuration files for Minikin" 2014-05-15 02:03:34 +00:00
Raph Levien
2836c4722a Merge "Start of Minikin integration" 2014-05-15 02:03:05 +00:00
Alan Viverette
0cfb877f5a Simplify attribute extraction for themed Drawables
Also fixes a bug in GlowPadView that randomly popped up.

Change-Id: Id20508a44ea02b4a14c8f794de36e13a2c06587c
2014-05-14 17:40:53 -07:00