summaryrefslogtreecommitdiff
path: root/libs/hwui/DeferredDisplayList.cpp
AgeCommit message (Collapse)Author
2016-07-07Delete old rendering pipelineChris Craik
fixes: 30002246 Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
2016-04-28resolve merge conflicts of 1599b981 to nyc-dev-plus-aospChih-Hung Hsieh
Change-Id: I90807581e10b6a0024515ff634ac8b29eaa5fc9f
2016-04-27Fix google-explicit-constructor warnings.Chih-Hung Hsieh
Bug: 28341362 Change-Id: Ibdd6a210bb7ff228e3624cc319169f77aca3b51e
2016-01-25Add internal Canvas save flagsFlorin Malita
Skia's SkCanvas::SaveFlags are being deprecated. This CL introduces the equivalent android::SaveFlags, converts all internal clients to the new enum, and switches the saveLayer glue to the SaveLayerRec-based API. Change-Id: Icb1785f4e7c0f652b1f04b34a1e3ccb063c408f3
2015-10-14Initial commit of new Canvas operation recording / replayChris Craik
Done: - drawRect, drawBitmap, drawColor, drawPaint, drawRenderNode, drawRegion - Recording with new DisplayList format - batching & reordering - Stateless op reorder - Stateless op rendering - Frame lifecycle (clear, geterror, cleanup) Not done: - SaveLayer (clipped and unclipped) - HW layers - Complex clipping - Ripple projection - Z reordering - Z shadows - onDefer prefetching (text + task kickoff) - round rect clip - linear allocation for std collections - AssetAtlas support Change-Id: Iaf98c1a3aeab5fa47cc8f9c6d964420abc0e7691
2015-10-02Merge "Move more utils into paintutils"Chris Craik
2015-10-01Merge "Simplify DeferredDisplayList construction"Chris Craik
2015-10-01Move more utils into paintutilsChris Craik
Change-Id: I1eb3fd52386bc61a592da235533e40b509eeec24
2015-10-01resolved conflicts for 31e5ded6 to masterSergio Giro
Change-Id: Iae4e1abe697f1c00a82b54c17afa7d4edddc006b
2015-10-01am 86e67d70: Merge "frameworks/base: delete TinyHashMap"Sergio Giro
* commit '86e67d708d738807c843850a3b6c9170e514ff8f': frameworks/base: delete TinyHashMap
2015-09-30frameworks/base: delete TinyHashMapSene Gales
In DeferredDisplayList use std::unordered_map instead of TinyHashMap Towards deprecation of BasicHashTable Change-Id: I91b8d5dc80444c88fecff9c362fa610cca253973
2015-09-28Simplify DeferredDisplayList constructionChris Craik
Change-Id: I385bd894fda097e35abb8f8d5eb8271f10bd163b
2015-09-22Remove lookup3 gamma codeChris Craik
Also clean up gamma / glyph cache properties Change-Id: I75b1ac0cb55638bf787ffd3cf457483ae314f03b
2015-07-30Replace most usages of utils/Vector.hJohn Reck
Change-Id: I540d1b3523244d6c71fc52d6fb30555271c25644
2015-07-14Clean up unncessary definesChris Craik
LOG_TAG and TRACE_TAG are already defined in the makefile Change-Id: I9e53e3dacbe018441edd74cb7c8c90846defee74
2015-06-12Fix roundrect clipping / blending orderingChris Craik
bug:21803918 Also, don't consider rr clipped ops opaque, and put stage checking behind a debug flag. Change-Id: I9304ae571337a7cf835524682d1a590a21d30fa4
2015-05-26Use path intersection instead of saveLayer+mesh to mask projected ripplesChris Craik
bug:14297149 SaveLayer's performance cost is high, and proportional to the surface being projected onto. Since ripples (even unbounded ones) are now always projected to the arbitrary background content behind them, this cost is especially important to avoid. This removes the last semi-secret, saveLayer from the projected ripple implementation. Also fixes the HW test app to correctly demonstrate this projection masking behavior. Additionaly, alters PathTessellator to gracefully handle counter-clockwise paths, and simplifies the work done by ShadowTessellator to ensure all of its paths are counterclockwise. Change-Id: Ibe9e12812bd10a774e20b1d444a140c368cbba8c
2015-05-05Cleanup propertiesChris Craik
bug:19967854 Separate properties from Caches, into static, RenderThread-only class. Also rewrites the means for java to set properties to correctly handle threading, and adds an override for profile bars so that SysUi doesn't clutter the screen with them. Change-Id: I6e21a96065f52b9ecc49d1a126244804ba106fa9
2015-04-28Remove concept of layer alpha overrideChris Craik
bug:19412691 Change-Id: I9e150fe4a1b2c0cf140519a33c02fd4771ef1c50
2015-01-21Remove DisplayListLogBufferChris Craik
Change-Id: I001832fc444b6d532f4a382e0a31cc1d8956dbd8
2015-01-05Add overrides and switch to nullptr keyword for all filesChris Craik
Adds remaining missing overrides and nullptr usages, missed due to an extreme failure in tool usage. Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
2014-12-17resolved conflicts for merge of fd461ede to masterChris Craik
Change-Id: I36f263c7e6d96355dd8a2c3565581b9a983ae481
2014-12-17am 93492d1a: am c748832f: Merge "Revert overdraw avoidance visualization ↵Chris Craik
change" into lmp-mr1-dev * commit '93492d1a478770783abab764855c8d47e0264f71': Revert overdraw avoidance visualization change
2014-12-17Revert overdraw avoidance visualization changeChris Craik
bug:18787324 Partial revert of 23d307c8d88f4a3849163b9e5b7cd11d0d4f372c. Change-Id: Ic8b91b046707fc5b8fa53c35ea7b37bb19c3c943
2014-12-12Fix styleJohn Reck
Change-Id: I7227b0eac126bf470ed50249a7809b845872983b
2014-11-22Revert "resolved conflicts for merge of 220c3f4f to master"Andreas Gampe
Reverted as hwui doesn't agree. This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9. Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
2014-11-21resolved conflicts for merge of 220c3f4f to masterAndreas Gampe
Change-Id: I37ecce8fddecdff82b0eace16f1ee75152f7171e
2014-11-21resolved conflicts for merge of 99377df1 to lmp-mr1-dev-plus-aospAndreas Gampe
Change-Id: I3a98f55832ac447b1ed0dd129c7a93d088025943
2014-11-21Frameworks/base: Unused parameters in hwuiAndreas Gampe
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
2014-11-10resolved conflicts for merge of 1d03b816 to lmp-mr1-dev-plus-aospAndreas Gampe
(cherry picked from commit 1272887050a269d6d506b42099c2857847ad100b) Change-Id: Ib673768fe5fc03615626ef4b10590e5317f22172
2014-11-10resolved conflicts for merge of 1d03b816 to lmp-mr1-dev-plus-aospAndreas Gampe
Change-Id: Ib673768fe5fc03615626ef4b10590e5317f22172
2014-11-10Frameworks/base: Wall Werror in libs/hwuiAndreas Gampe
Turn on -Wall -Werror in libs/hwui. Fix errors. Change-Id: I74962d08c889712dacbd0d86d6760fc10802b6bd
2014-11-04Remove status return from all uirenderer::Renderer functionsTom Hudson
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
2014-10-28am c7c8b069: Merge "Cleanup debug options" into lmp-mr1-dev automerge: ↵John Reck
b0aeaad automerge: 49a01fc * commit 'c7c8b069407236bcc04c086912c73002d48419ef': Cleanup debug options
2014-10-27Cleanup debug optionsJohn Reck
Bug: 18138852 Bug: 18065434 Change-Id: Ibb07b73b147c2a8b287fe8aee3f6624582f21b00
2014-10-17Refactor HWUI to better handle Canvas DrawFilters.Derek Sollenberger
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
2014-06-23No-fail invokeFunctorJohn Reck
Bug: 15513308 Bug: 15449247 Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
2014-05-23Merge "Inspect SkShader to determine hw shader."Chris Craik
2014-05-22Inspect SkShader to determine hw shader.Leon Scroggins III
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-15Round rect outline clippingChris Craik
Change-Id: Iee9cf4f719f6f1917507b69189ad114fa365917b
2014-05-07Avoid caching shadow properties in Java & HWUI.Derek Sollenberger
bug: 10650594 Change-Id: I6f57df002710bb0567ed7e53fc0bfe96cfd504b8
2014-02-07Removing SkiaColorFilter and inspecting the native object directly.Derek Sollenberger
bug: 10650594 Change-Id: I4fcf66d008765afa0e35d011f58bc792183cb74f
2013-09-18Merge "Disallow negative scale matrices in merged Bitmap drawing" into klp-devChris Craik
2013-09-16Disallow negative scale matrices in merged Bitmap drawingChris Craik
bug:10622962 Change-Id: I55ac18ad56b53dc9e6e6ea14cd3ec4bdafa98ac3
2013-09-13Fix merged operation clippingChris Craik
bug:10745870 Missing 'const' meant MergingDrawBatch would never clip anything. Change-Id: Ia6367eff94cf5f437efafbc3ba7f0da102ffd956
2013-09-12Move DeferredDisplayState out of opsChris Craik
bug:9969358 Instead of storing DeferredDisplayState within an op (thus forcing ops to be tied to a single state instance), associate each op with a new state at DeferredDisplayList insertion time. Now, DisplayLists (and the ops within) can be reused in a single DeferredDisplayList draw call, as ops will use different state instances at different points in the frame. Change-Id: I525ab2abe0c3883679f2fa00b219b293e9ec53d9
2013-06-21Initialize MergingDrawBatch clip with viewport boundsChris Craik
This allows merged, clipped operations to behave correctly within a savelayer, even if the base viewport has a large offset. Additionally, disregard opaqueness when within a complexclip/savelayer, as the coverage can't be trusted. Change-Id: Ic908b82a4bb410bc7fac1b4295f4874ed166efc5
2013-06-17Merge "Better handle op size edge cases"Chris Craik
2013-06-17Better handle op size edge casesChris Craik
bug:9464358 Previously, empty and unknown sized ops are assumed to fully cover their clip. This is now corrected such that empty sized ops are pre-rejected before defer. Additionally, unknown sized ops disable overdraw avoidance. Change-Id: Icf2ce24f98be5ea6299e24ffcf826790373564a1
2013-06-14Fix clip merging behaviorChris Craik
Previously, a new op with a clipped side could be added to a MergingDrawBatch without considering the batch's current bounds. Change-Id: I1b873ecf821bad7cda6630c3f311edd90ac5cc8c