5516 Commits

Author SHA1 Message Date
Chris Craik
9a9d1d5ad2 Merge "Tessellate on worker threads" into lmp-preview-dev 2014-06-10 04:52:12 +00:00
Adam Lesinski
cbb0213d81 DO NOT MERGE - Creating an empty package should be succesfull
Bug: 15473436
Change-Id: I788deb21a1298281c508429bab635aa713803984
(cherry picked from commit 807efa884ba01e0213667000a21908bfb04e8624)
2014-06-10 01:56:03 +00:00
Chris Craik
05f3d6e511 Tessellate on worker threads
Tessellate and cache (where possible) shadow and round rect
tessellation tasks.

Change-Id: I2cfda8e11d83d51ea74af871235cf26e8f831d40
2014-06-10 01:53:17 +00:00
Chris Craik
56f46abdcd Merge "Fix issues around GL on incorrect thread" into lmp-preview-dev 2014-06-05 21:53:48 +00:00
Chris Craik
18bf85d4ae Fix issues around GL on incorrect thread
bug:15416165
bug:15414673

DisplayListRenderer must override these callbacks from
StatefulBaseRenderer, since the super implementations call GL.
Eventually, we'll just have DisplayListRenderer inherit from
StatefulBaseRenderer directly.

Change-Id: I7b20aa0ac6cae3bf6c6969c63bf9ba98ab2831ff
2014-06-05 12:22:15 -07: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
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
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
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
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
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
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
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
ztenghui
f11310f395 Check the array before accessing it
TODO: Figure out why the path is generating empty polygon.

bug: 14615368

Change-Id: If116e34388b7c6a71bf5ddd36e0c9716d7450732
2014-05-14 21:02:45 +00:00
Adam Lesinski
f8c940733e Merge "Fix potential crash in libandroidfw" 2014-05-14 20:30:09 +00:00
Adam Lesinski
7322ea7b73 Fix potential crash in libandroidfw
A malformed APK may cause a crash if it
encodes its chunk size as a signed number
(MSB set to 1).

Bug:14898892
Change-Id: I342853c2b0859e5be15d712d451323afc367d329
2014-05-14 11:46:19 -07:00
John Reck
bee74c2b47 Merge "Clamp to uint8 for alpha" 2014-05-13 21:59:36 +00:00
John Reck
66f0be65a1 Wire up texture atlas
Bug: 14590563

Change-Id: I2dffbc089dc801f5fb2d1c8fd38e1c71d160e110
2014-05-13 14:54:42 -07:00
John Reck
531ee701dd Clamp to uint8 for alpha
Change-Id: Id3e51671297bfb879969ad2fe7a5741dd4cf4c29
2014-05-13 10:06:08 -07:00
John Reck
515396a6b5 Merge "More native interpolators" 2014-05-13 16:17:03 +00:00
John Reck
c8ac775659 More native interpolators
Gotta collect 'em all

Change-Id: I3ccc2b5c842b27b906c8a0470fbedc2bf285bc38
2014-05-12 16:42:02 -07:00
John Reck
cae6873161 Merge "Add TimeInterpolator support to RNA" 2014-05-12 22:11:00 +00:00
John Reck
315c329544 Add TimeInterpolator support to RNA
Bug: 14678626

Change-Id: I6554e7fcd42c49fac3618ca792083bb68e358f55
2014-05-12 14:41:06 -07:00
Adam Lesinski
f000977620 Merge "Add support for building split APKs" 2014-05-12 18:12:35 +00:00
Adam Lesinski
fab50875b9 Add support for building split APKs
Build multiple APKs, each containing a disjoint subset
of configurations. These can then be loaded into the device
AssetManager and should operate as if they were never split.

Use the idea of building multiple sets of files, where each
set represents an APK. An ApkBuilder can place files
in a set based on its configuration, but you can actually
add directly to a set, in the case of the resources.arsc and
generated AndroidManifest.xml for splits.

Change-Id: Ic65d3f0ac1bbd290185695b9971d425c85ab1de3
2014-05-11 18:30:12 -07:00
Jorim Jaggi
ddc52285ca Revert "Simplify projection matrix management."
This reverts commit 0efaa71d5414287ed4beac0a88cf76f7e33a1e74.
2014-05-11 16:16:17 +02:00