5529 Commits

Author SHA1 Message Date
John Reck
982e28cafd Merge "Cleanup" 2014-06-02 22:44:50 +00:00
John Reck
ce444ca400 Cleanup
Change-Id: Ie366390272724a2c1dfda99b0e85806b7a612744
2014-06-02 15:12:36 -07:00
John Reck
776512d4b6 am feccbdc4: Merge "Add setStartValue to RNA" into lmp-preview-dev
* commit 'feccbdc4d0bee3eb4c395bd93ba51cbc6616527a':
  Add setStartValue to RNA
2014-06-02 18:19:44 +00:00
John Reck
c6b3264e16 Add setStartValue to RNA
Bug: 15198607
 Should be good-enough for Ripples to use for pseudo-chaining
 support.

Change-Id: Ia8666928ccb69ae401cb583751632a52bd928b63
2014-06-02 11:00:09 -07:00
John Reck
c6b6154ac1 am ea5af639: Merge "Re-jigger layers" into lmp-preview-dev
* commit 'ea5af63965bf323580aa1e2854efb2f8cc3dc396':
  Re-jigger layers
2014-05-30 21:39:04 +00:00
John Reck
d72e0a339b Re-jigger layers
Bug: 15185239
 Bug: 15238382

 Make DeferredLayerUpdater ref counted so that
 HardwareLayer:finalizer() works non-crashily on
 leaked layers
 Give DeferredLayerUpdater the ability to have a layer destroyer
 set so that leaked layers can still be recycled on the
 RenderThread
 Order layer updates based off of pushLayerUpdate() calls to fix
 issue with nested layers

Change-Id: I4449cee607f7e5126e02fed7464cf48038e3dfdf
2014-05-30 12:19:33 -07:00
Kenny Root
25e40de45f resolved conflicts for merge of b68f5f09 to master
Change-Id: Ib8dd3a353f40a3357c8dc5ac591cd5e3ab4d0a4b
2014-05-30 11:51:20 -07:00
Chris Craik
b68f5f0932 am 4d31c547: am ce7fa780: Merge "Fix a resource race bug in PathCache"
* commit '4d31c5474bcc4bcc6a6d8dfe232360dad701a3fc':
  Fix a resource race bug in PathCache
2014-05-30 18:03:32 +00:00
Chris Craik
4d31c5474b am ce7fa780: Merge "Fix a resource race bug in PathCache"
* commit 'ce7fa780cdee2730b570cc34066f15c74d44e6ef':
  Fix a resource race bug in PathCache
2014-05-30 17:59:51 +00:00
Derek Sollenberger
b2367cbf39 Merge "Update HWUI matrix API" 2014-05-30 15:34:34 +00:00
yuyang
7061f7d791 Fix a resource race bug in PathCache
When enabled defer rendering, it will do precache for DrawPathOp.
The paint used for creating PathTask in precache just get the address
of mFilteredPaint of OpenGLRenderer. So for the following defer
operation like DrawTextOp has possibility change the mFilteredPaint
by getPaint while another WorkerThread in PathCache is using the paint
which pointed to the same address of mFilteredPaint to generate bitmap.
As a result, it will generate a wrong bitmap for generateTexture in
PathCache. To fix it, do a copy of paint when creating PathTask.

CRs-Fixed: 664244

Change-Id: I5516f5b143458b88d3573d15b7ebb34f688800c7
2014-05-30 08:26:37 +05:30
John Reck
2cfc0e543f am 894bb170: Merge "Enable debug stuffs" into lmp-preview-dev
* commit '894bb1701ae15b87af1e3bfe865fe191081cc806':
  Enable debug stuffs
2014-05-29 22:27:12 +00:00
John Reck
2143fdba1c am b5797c9e: Merge "Re-enable atlas" into lmp-preview-dev
* commit 'b5797c9eebd6407bd19526d4d4ed371be147b323':
  Re-enable atlas
2014-05-29 22:27:05 +00:00
John Reck
aee470c023 Merge "Enable debug stuffs" into lmp-preview-dev 2014-05-29 22:23:41 +00:00
John Reck
fe5e7b7346 Enable debug stuffs
Bug: 14596762
 * dumpsys gfxinfo implemented
 * profile GPU visual_bars implemented

Change-Id: Icb948a9d5af5989b5615504d0d76ade64b93ef5b
2014-05-29 15:00:29 -07:00
John Reck
c8affe0e1b Re-enable atlas
Bug: 14590563

Change-Id: I04ed5bf1b2654dab4a65c1e43faaeba32459870f
2014-05-29 14:50:37 -07:00
Derek Sollenberger
139088228f Update HWUI matrix API
1. more closely mirror Skia API by using const ref instead of ptrs
2. store SkMatrix in the drawOp instead of the linear allocation heap

Change-Id: I4b9f6f76b9f7d19325e29303d27b793679fd4823
2014-05-29 16:51:23 -04:00
John Reck
81d29b5f0c am 2d196d9f: Merge "Implement FlushCaches TODO" into lmp-preview-dev
* commit '2d196d9f9d4978fd0df80815e15012518be5ff18':
  Implement FlushCaches TODO
2014-05-28 16:05:06 +00:00
John Reck
45d0192929 Merge "Implement FlushCaches TODO" into lmp-preview-dev 2014-05-28 16:02:06 +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
John Reck
e1628b7c6f Implement FlushCaches TODO
Change-Id: Id05429e98ffe0858275b32c41fb215c1d8d930b2
2014-05-23 15:40:14 -07:00
John Reck
d04d303e5d resolved conflicts for merge of 1f6c973b to master
Change-Id: I0d0a72f1d737fa80ac4c258c1f9fc52ef85724bd
2014-05-23 13:56:35 -07:00
John Reck
a5dda645da Bag of scheduling tweaks
Bug: 15118640

 * Prevent over-stuffing the queue by dropping frames
 * Prevent double-drawing in one pulse by RT by deferring
   vsync registration until post-draw so that it catches
   the next vsync pulse instead of the current one
 * Bias vsync race condition towards the UI thread
 * Fix queueDelay to actually work

Change-Id: Ibf584258bd93ebcbba058bd976dc8b307f1c6155
2014-05-23 12:56:38 -07:00
Derek Sollenberger
c33fb2b5c0 Merge "Pass the radius as a float deeper into HWUI allowing RS to generate more accurate blurs." 2014-05-23 15:51:20 +00: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
Chris Craik
d490aa4260 Merge "Inspect SkShader to determine hw shader." 2014-05-23 00:03:46 +00: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
Chris Craik
b8fe2fcd71 Merge "Define light position (using new lighting spec) in Java" 2014-05-22 00:18:21 +00: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
Chris Craik
61317325b7 Disable shadow drawing for empty/null outlines
Change-Id: I60d0f326cfab97d88c49d17cf32e619b5e60b94a
2014-05-21 13:04:10 -07:00
Derek Sollenberger
e392c81f6b Pass the radius as a float deeper into HWUI allowing RS to generate more accurate blurs.
Also, when converting radius to an integer value snap to the appropriate integer boundaries.

bug: 10650594
Change-Id: Icca4bc17d88162bbcbc6035d4f81bd1d98a4de2d
2014-05-21 13:27:10 -04:00
Chris Craik
f2985ba3f4 Merge "Correct viewport initialization, bounds comparison" 2014-05-19 21:54:03 +00:00
Chris Craik
50b843883d am 3c769ec0: am 00fabcbe: am b1708e9b: Merge "Use alpha channel instead of red in drawCachedGlyphBitmap"
* commit '3c769ec02b8b82bec4dec2169bf76af58be94a9a':
  Use alpha channel instead of red in drawCachedGlyphBitmap
2014-05-19 19:35:59 +00:00
Chris Craik
3c769ec02b am 00fabcbe: am b1708e9b: Merge "Use alpha channel instead of red in drawCachedGlyphBitmap"
* commit '00fabcbeb035fb513293ea01d245002f40b3234f':
  Use alpha channel instead of red in drawCachedGlyphBitmap
2014-05-19 19:32:38 +00:00
Chris Craik
00fabcbeb0 am b1708e9b: Merge "Use alpha channel instead of red in drawCachedGlyphBitmap"
* commit 'b1708e9b764268a06d91219a5c39ee9efd32ab00':
  Use alpha channel instead of red in drawCachedGlyphBitmap
2014-05-19 19:27:52 +00:00
Ben Cheng
1a49868fd8 Use default visibility for Snapshot::getLocalClip (attempt #2).
The change appeared to be dropped.
See commit 65ba94f79d6e737c3e66c09032221999b2eb50d7 for details.

Change-Id: Ib60968d6327ef04d21e4adca2c394f66343f204b
2014-05-17 15:37:26 -07:00
Alan Viverette
ad2f8e334f Update ripple behavior, use render thread animation
Change-Id: Ib6bc1e08b05d29606f452961963d58b8fc866746
2014-05-16 13:28:33 -07:00
Narayan Kamath
0c42f3bb33 am 2c125876: am 8a196c06: Merge "Change InputMessage.motion.pointerSize to a uint32_t."
* commit '2c125876208c6b7173ef561316843d64ae1599e2':
  Change InputMessage.motion.pointerSize to a uint32_t.
2014-05-16 12:13:49 +00: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
Chris Craik
924197513a Correct viewport initialization, bounds comparison
Change-Id: Ibd751856e3712991e149800ed179464397dad7c3
2014-05-15 13:21:28 -07:00
John Reck
ff941dcd81 Animator start value...
Change-Id: Ifd35ed95a28c625086d7fa97764fe63ab4a997f1
2014-05-15 08:53:39 -07:00
Digish Pandya
c62c1cc17d Use alpha channel instead of red in drawCachedGlyphBitmap
the correct value to copy in bitmap is alpha component from
the cachebuffer. currently it is offset to red channel if format is
RGBA which is wrong.

this is followup fix for https://android-review.googlesource.com/#/c/93943/

Change-Id: I96b5ba35df5ccaef44caf2542d35d6585ba1df80
Signed-off-by: Digish Pandya <digishp@codeaurora.org>
2014-05-15 08:59:22 +05:30
Chris Craik
fe4c1e225d Merge "Combine projection matrix, and viewport management" 2014-05-15 02:01:14 +00:00
Chris Craik
96f266ee5d Merge "Remove Path based outline clipping" 2014-05-15 02:00:36 +00:00
Chris Craik
2bcad17675 Remove Path based outline clipping
Change-Id: Ic5ccd98a7517b46e768e53d6b0c8fdcda305fb2c
2014-05-14 18:11:23 -07:00
Chris Craik
a64a2bef10 Combine projection matrix, and viewport management
Merge management of ortho projection matrix with the viewport size,
since they should always be changed together.

Change-Id: Iccb8f30828f4fb7848999ac54852e7ed2d6f2eb1
2014-05-14 17:27:52 -07:00
John Reck
3eb9882a67 Merge "Disable texture atlas" 2014-05-14 23:59:14 +00:00
John Reck
cdfeef6624 Disable texture atlas
Bug: 14952384

Change-Id: If38b3e4c08c2c3dd9c00ae9e6e8c10e208e737d1
2014-05-14 23:59:01 +00:00
ztenghui
a6464b38fc Merge "Check the array before accessing it" 2014-05-14 23:15:22 +00:00