summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListOp.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix rendernode flag loggingChris Craik2015-04-301-1/+1
| | | | Change-Id: I978c54ab26ef6dc3f6caef8604ac77a883b8e913
* Remove unused flags and dirty rectsChris Craik2015-04-281-4/+2
| | | | | | | | bug:17209071 Also update DisplayList->RenderNode naming in Editor Change-Id: I1d505640ba7388a0b0042d9c787f859e45a24da5
* Rename native DisplayListRenderer to DisplayListCanvasChris Craik2015-04-201-1/+1
| | | | Change-Id: I33e6f8cc85da1e7da7ff7bf18d4ebde64222067a
* Glop mesh reorg, support for drawBitmapMeshChris Craik2015-02-261-2/+5
| | | | Change-Id: Iaf5550bdd93da93e59a5b838234ab5612e067387
* Remove renderer abstract classChris Craik2015-02-251-1/+1
| | | | | | | No longer needed, allowing vast majority of methods on OpenGLRenderer to be non-virtual. Change-Id: I8a6ee042b95050dc666887579ef4e1c7a8f9b33b
* Glop support for custom textured UVs, simplify drawBitmap(src,dst)Chris Craik2015-02-251-3/+1
| | | | | | Front load the scaling-to-support-shaders to record time. Change-Id: I861c82d9d16d3c5e063cf87230127eed0b3f9b54
* Glop Bitmap and RoundRect clipping supportChris Craik2015-02-121-1/+2
| | | | Change-Id: I4577546a5d2e5f084cc03f39a89db9231b8111ee
* Move scissor state to RenderStateChris Craik2015-01-271-8/+8
| | | | Change-Id: I1227a3886fb24e4d9fad79fca469794f06cfb15e
* Update HWUI to store its own SkBitmap objectsDerek Sollenberger2015-01-091-21/+0
| | | | | | | | | | | This enables us to... 1) simplify the lifecycle/ownership between Java and HWUI 2) remove DisplayListRenderer::drawBitmapData and associated logic 3) track pixel lifecycle using standard SkPixelRef refcounting 4) Remove uncessary calls to ref/unref the bitmap's pixels and colorTable Change-Id: I3c95078da20995444f6388a029414280fd654318
* Add overrides and switch to nullptr keyword for all filesChris Craik2015-01-051-148/+150
| | | | | | | Adds remaining missing overrides and nullptr usages, missed due to an extreme failure in tool usage. Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
* Make DisplayListRenderer inherit from Canvas, merge JNITom Hudson2015-01-051-1/+2
| | | | | | | | | | | | | Incrementally unify the upper layers for Skia and HWUI. Remove redundant code from GLES20Canvas.java; instead use inherited mNativeCanvasWrapper and superclass method definitions. Moves some unrelated SkPaint utility functions from Renderer to new utils/PaintUtils. bug: 15672762 Change-Id: I4ddd4214b8e9eeb95289d054ef423f2542bb5fa5
* Cleanup various clang warnings, use unique_ptrs in several placesChris Craik2014-12-231-17/+4
| | | | Change-Id: I347904b25e51fcc7de14b1e72f1acd0f6ba26f3f
* resolved conflicts for merge of d67bb501 to masterYohann Roussel2014-12-111-33/+25
|\ | | | | | | Change-Id: I40698ce1e382cb41eec7af5ea49ac0e2f997d555
| * am eb2dcc79: Merge "Don\'t preload textures for AssetAtlas" into lmp-mr1-devJohn Reck2014-12-111-33/+25
| |\ | | | | | | | | | | | | | | | | | | automerge: e4a6ed9 * commit 'e4a6ed9d6d8721c9fad018b0d43dfe7daf4b24e7': Don't preload textures for AssetAtlas
| | * Don't preload textures for AssetAtlasJohn Reck2014-12-101-33/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 18317479 RenderNode::prepareSubTree calls prefetchAndMarkInUse on every bitmapResoruce in the DisplayList. However, this resulted in textures being uploaded for bitmaps that would be drawn from the AssetAtlas instead. To fix this we teach TextureCache about the AssetAtlas so that calls to TextureCache return the Texture from AssetAtlas if it exists. Thus usage of AssetAtlas is now purely to allow for further optimizations via draw merging instead of a requirement to get any benefit at all. Change-Id: I65282fa05bac46f4e93822b3467ffa0261ccf200
* | | resolved conflicts for merge of 3bae94d7 to masterNick Kralevich2014-12-101-2/+4
|\ \ \ | |/ / | | | | | | Change-Id: I381539b1494447d62290c492f2550840fe0b559c
| * | resolved conflicts for merge of fe11126d to lmp-mr1-dev-plus-aospJohn Reck2014-12-091-4/+6
| |\ \ | | |/ | | | | | | Change-Id: I60bf82ff71d9af0d80e7da8856efb4641c85885b
| | * Teach AssetAtlas about more drawablesJohn Reck2014-12-091-2/+4
| | | | | | | | | | | | | | | | | | Bug: 18317479 Change-Id: I16868ee204d24af72af9a2efc987f7e9eb1d266b
* | | Revert "resolved conflicts for merge of 220c3f4f to master"Andreas Gampe2014-11-221-113/+113
| | | | | | | | | | | | | | | | | | | | | | | | Reverted as hwui doesn't agree. This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9. Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
* | | resolved conflicts for merge of 220c3f4f to masterAndreas Gampe2014-11-211-113/+113
|\ \ \ | |/ / | | | | | | Change-Id: I37ecce8fddecdff82b0eace16f1ee75152f7171e
| * | resolved conflicts for merge of 99377df1 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-211-117/+117
| |\ \ | | |/ | |/| | | | Change-Id: I3a98f55832ac447b1ed0dd129c7a93d088025943
| | * 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
* | | Remove status return from all uirenderer::Renderer functionsTom Hudson2014-11-041-63/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the interface closer to android::Canvas. The only use of return values was in the OpenGLRenderer subclass; that is replaced with an internal dirty flag: returned from finish(), checked by CanvasContext. This is part of a series of CLs to refactor the Graphics JNI bindings. BUG:15672762 R=djsollen@google.com,ccraik@google.com Change-Id: Ifd533eb8839a254b0d3a5d04fc5a2905afdfc89e
* | | Refactor HWUI to better handle Canvas DrawFilters.Derek Sollenberger2014-10-171-67/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, this CL removes the need to decompose the DrawFilters in Java and instead passes the SkDrawFilter to HWUI directly. This also allows the removal of duplicated logic between HWUI and other Canvas implementations regarding Paint filter levels. Second, the DrawFilter is now stored in the DisplayListRenderer where we apply it to every paint BEFORE it is stored in the DisplayList. This eliminates the need to filter all Paints on playback and removes additional complexity at playback. Finally, as a result of storing the filtered paint we can now do a better job caching the paints. This takes advantage of recent changes in Skia to quickly enable quick hashing and comparison of paint objects. Change-Id: Iec507a2d894827975cc4f1d22241542bb0534b4e
* | | Clean up physical couplingTom Hudson2014-10-151-0/+3
|/ / | | | | | | | | | | | | | | Narrow the use of #include directives in hwui, replacing with forward declarations where straightforward. Speeds compiles; doesn't do any restructuring of code. Change-Id: Icac2baffb5896f55d8c6718e9bd9d4bfa02d3ca0
* | Account for colorfilter transparency in determining paint opacityChris Craik2014-10-011-1/+4
|/ | | | | bug:17765601 Change-Id: I90d76ee199bb357c71fc8f537c1abfa20d848416
* 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
|\ \ | |/ |/|