summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListOp.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Frameworks/base: Unused parameters in hwui"John Reck2014-11-221-117/+117
| | | | | | This reverts commit 42ddc18d108f789705ad4eb697ce9599ad322507. Change-Id: I3574a936a39a96314db6437d0a1eb58d260d893d
* Frameworks/base: Unused parameters in hwuiAndreas Gampe2014-11-211-117/+117
| | | | | | | | | Remove Clang cutout for unused parameters. Fix warnings. Remove Clang cutout for deprecated Skia function usage. Has been fixed in the L push. Change-Id: I7ea073ff67127cc1e14e798b655e2c50615fe8e7
* Use RenderThread for navigation bar ripplesJorim Jaggi2014-09-161-0/+28
| | | | | Bug: 17506181 Change-Id: Icf3b80f8c4bc29fe85313381d4019dda3ef85ea9
* Update transform isolation to handle command chunksChris Craik2014-08-271-2/+1
| | | | | | | | | | bug:15570351 Prevent drawing transformations on a ViewGroup's canvas from directly affecting the transformation of the children through the renderer, since it's already baked into mTransformFromParent at record time. Change-Id: I6310a2260dfe4def0bde1fd2c5b93791a645d586
* Create z reordering boundaries around dispatchDrawChris Craik2014-08-251-3/+5
| | | | | | | | | | bug:16012254 This means rendernodes with a Z will no longer be drawn at the end of their parent's DisplayList, but at the end of the associated reorder region (DisplayListData::Chunk). Change-Id: Ia033fee9d9a4db567b2a8d5e90fc57a4d0a64544
* Merge "Early reject drawText calls that will not draw" into lmp-devChris Craik2014-08-191-2/+4
|\
| * Early reject drawText calls that will not drawChris Craik2014-08-191-2/+4
| | | | | | | | | | | | | | | | | | | | bug:17114102 Prevents high contrast text from drawing invisible text. Also fixes stroked text bounds calculation. Change-Id: Iaeff51ead8b7b8ef2a1a0ca8b89598564e0d443f
* | Respect round rect clip when determining op opaquenessChris Craik2014-08-181-0/+2
|/ | | | | bug:17115570 Change-Id: I30184b4678d333b5d222af8b61daa07a5e865cab
* Fix leak of SkPathRefsChris Craik2014-08-081-11/+9
| | | | | | | | | bug:15939479 SkPath objects owned by DisplayListOps weren't being torn down, and thus weren't releasing their SkPathRef innards. Change-Id: I2581e124600a93a399ef3251f456c02ab52839a8
* Move bitmap transforms out of bitmap opsChris Craik2014-08-061-38/+8
| | | | | | | | | | bug:11359533 This allows us to deduplicate a lot between the two ops, and fixes the shader coordinate space for the left,top argument drawBitmap to match software. Change-Id: I53da05af9ee74c74e9e70b4ab8053190ca220b16
* Use RoundRect clipping for circle reveal animationChris Craik2014-07-301-5/+3
| | | | | | | | bug:16630975 Also, remove inverse clipping feature from reveal animator. Change-Id: I770a4eb48cd123b0ca0f39d16a0f3eefd1be3653
* Minor cleanups around color usageChris Craik2014-07-171-6/+9
| | | | Change-Id: I56733cbe933a58d5977c032f056abb35265ee252
* SkBitmap::Config is deprecated, use SkColorTypeMike Reed2014-07-081-1/+1
| | | | Change-Id: Ic953741325607bf85598c097bb3ab648d4a08996
* Add hack for custom re-rasterization bucketsChris Craik2014-07-071-4/+5
| | | | | | | | | | bug:14083128 Moves all of the font transform management into OpenGLRenderer::findBestFontTransform(), and now simply passes down final rasterization transforms into the FontRenderer. Change-Id: Ie02752e6af863347b142367c7d628db5f9fc2998
* CleanupJohn Reck2014-06-271-2/+2
| | | | Change-Id: I8a75e6e32a4cb02e3978503305b4cdce1727e89a
* No-fail invokeFunctorJohn Reck2014-06-231-4/+4
| | | | | | | Bug: 15513308 Bug: 15449247 Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
* Update 'DisplayList' vs 'RenderNode' naming in several placesChris Craik2014-06-231-18/+18
| | | | Change-Id: I635c6627d098b661fb9b0ba1bd42fa6d7277d287
* Merge "Wrap ViewGroup content in save/restore to protect composited children"Chris Craik2014-06-201-4/+4
|\
| * Wrap ViewGroup content in save/restore to protect composited childrenChris Craik2014-06-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug:15570351 Pos Z composited children are drawn before the primary restore for a RenderNode. This means that without an additional save/restore (which wraps the content) they aren't protected from transformations/clips that happen within the ViewGroup's DisplayList. Also changes RenderNode to use OpenGLRenderer tag for displaylist dumping consistency, and simplifies the entry points into RenderNode drawing, since the distinction between tree root vs tree internal is no longer important. Change-Id: I2621eba0592c74d71f85a91a4ab3d0da2d7468d3
* | Clean up tessellation cache in prep for other tesselation typesChris Craik2014-06-181-2/+2
|/ | | | | | | | bug:15536396 Also fixes compilation warning, avoids SkPaint deep copy Change-Id: I74334f08b1d34c6789aabf968ff62db5bacbed1b
* am b1c76a1a: Merge "Tessellate on worker threads" into lmp-preview-devChris Craik2014-06-101-2/+27
|\ | | | | | | | | * commit 'b1c76a1abcfb2f33e12fef37ec71d20724863b5e': Tessellate on worker threads
| * Tessellate on worker threadsChris Craik2014-06-101-2/+27
| | | | | | | | | | | | Tessellate and cache (where possible) shadow and round rect tessellation tasks. Change-Id: I2cfda8e11d83d51ea74af871235cf26e8f831d40
| * DO NOT MERGE Inspect SkShader to determine hw shader.Leon Scroggins III2014-05-231-34/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | CleanupJohn Reck2014-06-021-7/+7
| | | | | | | | Change-Id: Ie366390272724a2c1dfda99b0e85806b7a612744
* | Update HWUI matrix APIDerek Sollenberger2014-05-291-12/+12
| | | | | | | | | | | | | | 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
* | Merge "Inspect SkShader to determine hw shader."Chris Craik2014-05-231-34/+10
|\ \ | |/ |/|
| * Inspect SkShader to determine hw shader.Leon Scroggins III2014-05-221-34/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Disable shadow drawing for empty/null outlinesChris Craik2014-05-211-24/+10
|/ | | | Change-Id: I60d0f326cfab97d88c49d17cf32e619b5e60b94a
* Merge "Avoid caching shadow properties in Java & HWUI."Derek Sollenberger2014-05-081-39/+12
|\
| * Avoid caching shadow properties in Java & HWUI.Derek Sollenberger2014-05-071-39/+12
| | | | | | | | | | bug: 10650594 Change-Id: I6f57df002710bb0567ed7e53fc0bfe96cfd504b8
* | Add CanvasProperty for drawCircleJohn Reck2014-05-021-0/+21
|/ | | | Change-Id: Icbcc030f5033d2094e567d7c519b9d672f2aac1c
* Clip TouchFeedbackDrawable effect to receiver OutlineChris Craik2014-04-231-3/+20
| | | | | | | | Projected RenderNodes are now wrapped with a ClipRect or masked SaveLayer, so that they are clipped to the outline of the projection receiver surface. Change-Id: I1d4afc1bb5d638d650bc0b1dac51a498f216773e
* Fix issue with bitmap uploadingJohn Reck2014-04-141-20/+0
| | | | | | Bug: 13912749 Change-Id: Ic23fa1d280118dc93dc2716a4a24cc0bbbdca595
* Refcount RenderNodeJohn Reck2014-04-071-0/+2
| | | | Change-Id: I7a86db8acc2b78ef33d987a43a119f5933d7d752
* Support shadows on the root RenderNodeChris Craik2014-03-281-2/+2
| | | | | | | | | | | | bug:13211941 Cleans up some of the RenderNode method naming Also removes unnecessary clip/save/restores, clipping shadows predictably, as drawn by the parent, before drawing (and clipping, etc.) the shadow casting child. Change-Id: I795115e1fb869bbbdd7be43e279b97490fecc7e0
* Disable shadow overdraw avoidance in the inverse clip caseChris Craik2014-03-271-5/+9
| | | | | | | The caster is effectivly transparent, so skip the optimization just as is done for alpha < 1.0 Change-Id: I3d294222adf0137e20c1fb5808313d487e92e0a8
* Add private circular reveal API on View/RenderNodeChris Craik2014-03-251-11/+23
| | | | Change-Id: I139c8e12b354083149a665f6768f3f6931a8dd15
* Rename DisplayList->RenderNodeJohn Reck2014-03-121-3/+3
| | | | Change-Id: Id42e23c9a1a6eb6eaeafef707ced7fa6887b03d0
* Fix orthographic shadows projection, simplify shadow reorderingChris Craik2014-03-121-12/+14
| | | | | | | | | Separate matrix passed to shadow system into two parts, one for transforming the polygon XY points (using the actual draw matrix) and a separate one which respects correct 4x4 3d rotations and translations for determining Z values. Change-Id: I7e30a84774a8709df6b2241e8f51fc5583648fe8
* Fix use of Skia deprecated methodsChris Craik2014-02-281-1/+1
| | | | Change-Id: Ib89c20fc94bcce29b7490d6f55c73492735befda
* am 61910447: am 7942397b: am 19256340: am 22c66639: Merge "Fixes for 64bit ↵Narayan Kamath2014-02-211-1/+1
|\ | | | | | | | | | | | | in libhwui" * commit '6191044729b2dace9c9b4b15b19a8839377d8973': Fixes for 64bit in libhwui
| * Fixes for 64bit in libhwuiKévin PETIT2014-02-211-1/+1
| | | | | | | | | | | | | | | | | | Using reinterpret_cast allows conversions between pointer types and integers which don't have the same size. The corresponding flags is -Wint-to-pointer-cast. Change-Id: I8ff0c79d235fa6d07b8d9305edc185d946d5133d Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
* | Removing SkiaColorFilter and inspecting the native object directly.Derek Sollenberger2014-02-071-32/+0
| | | | | | | | | | bug: 10650594 Change-Id: I4fcf66d008765afa0e35d011f58bc792183cb74f
* | Merge "Keep the SkPaint used when creating a layer."Derek Sollenberger2014-02-071-17/+15
|\ \
| * | Keep the SkPaint used when creating a layer.Derek Sollenberger2014-02-071-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | This will allow us to inspect the paint for thing other than color and xfermode, such as SkColorFilters and SkShaders. bug: 10650594 Change-Id: I2c3ddd07a3966e1e77af34136307e2b59b2898c1
* | | Simplify DisplayList matricesChris Craik2014-02-051-3/+3
|/ / | | | | | | | | | | | | Somewhat unifies the ortho/perspecive paths - the property matrix (translate/scale/rotate) is now always a Matrix4. Change-Id: I36e4fe83d1150ee6e4be5f64f34d0fc8d6525cc6
* | Add initial hidden outline APIsChris Craik2014-01-301-11/+17
| | | | | | | | | | | | | | Background drawable outline usage and drawable outline calculation still to come. Change-Id: I8c7539f1638f86e1f8eb11f4fe49f705f61d58ba
* | Use path outlines to define shadow shapesChris Craik2014-01-261-1/+3
| | | | | | | | | | | | | | | | | | Fixes the simplifying assumption that shadow casters were always rectangular. Java side APIs + plumbing to pass down correct shapes still need to be added. Change-Id: Ic4fee90af15679951a44bb5cc6ae454b98c4c194
* | Support projection of DisplayLists onto ancestors.Chris Craik2014-01-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For now, ancestor views signal the acceptance of projections with a save(0x20)/restore pair. During the order traversal, each view with the save(0x20) code will collect descendent views with mProjectToContainedVolume (which still needs to be renamed) so that they can be drawn out of order later. - *Temporary* sample code added to HwAccelerationTest. - Note that a projected displaylist must not be clipped. Change-Id: I45c493e845961535b958d59c53e8aff3f8891d9f
* | Use const where possible for drawing parametersChris Craik2014-01-031-53/+54
| | | | | | | | | | | | They should never be modified by a Renderer, only read and copied. Change-Id: I9d8d55dca19115ee9dfeb2bb3f092ba2fb327cd4