diff options
author | Chris Craik <ccraik@google.com> | 2015-10-05 13:00:52 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-10-14 16:10:40 -0700 |
commit | b565df13a9e5c7b1d7d93bdfa4a793752d66d3cc (patch) | |
tree | 4a2dadd3b2c95663c23a626eff75962a0b8d4ce2 /libs/hwui/DisplayList.h | |
parent | b08949151f8dfc7a72ea6696f2e6067c2b1643bb (diff) |
Initial commit of new Canvas operation recording / replay
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
Diffstat (limited to 'libs/hwui/DisplayList.h')
-rw-r--r-- | libs/hwui/DisplayList.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/libs/hwui/DisplayList.h b/libs/hwui/DisplayList.h index 0bdb8169ea06..8ba9ac357414 100644 --- a/libs/hwui/DisplayList.h +++ b/libs/hwui/DisplayList.h @@ -55,11 +55,12 @@ class OpenGLRenderer; class Rect; class Layer; -class ClipRectOp; -class SaveLayerOp; -class SaveOp; -class RestoreToCountOp; +#if HWUI_NEW_OPS +struct RecordedOp; +struct RenderNodeOp; +#else class DrawRenderNodeOp; +#endif /** * Holds data used in the playback a tree of DisplayLists. @@ -107,6 +108,7 @@ struct ReplayStateStruct : public PlaybackStateStruct { */ class DisplayListData { friend class DisplayListCanvas; + friend class RecordingCanvas; public: struct Chunk { // range of included ops in DLD::displayListOps @@ -139,11 +141,21 @@ public: Vector<Functor*> functors; const std::vector<Chunk>& getChunks() const { - return chunks; + return chunks; } +#if HWUI_NEW_OPS + const std::vector<RecordedOp*>& getOps() const { + return ops; + } +#endif +#if HWUI_NEW_OPS + size_t addChild(RenderNodeOp* childOp); + const std::vector<RenderNodeOp*>& children() { return mChildren; } +#else size_t addChild(DrawRenderNodeOp* childOp); const std::vector<DrawRenderNodeOp*>& children() { return mChildren; } +#endif void ref(VirtualLightRefBase* prop) { mReferenceHolders.push_back(prop); @@ -157,10 +169,18 @@ public: } private: +#if HWUI_NEW_OPS + std::vector<RecordedOp*> ops; +#endif + std::vector< sp<VirtualLightRefBase> > mReferenceHolders; +#if HWUI_NEW_OPS + std::vector<RenderNodeOp*> mChildren; +#else // list of children display lists for quick, non-drawing traversal std::vector<DrawRenderNodeOp*> mChildren; +#endif std::vector<Chunk> chunks; |