diff options
author | Chris Craik <ccraik@google.com> | 2015-10-15 10:55:15 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-10-15 10:55:15 -0700 |
commit | 10ed692118552a01ff97b095295852b631e51bee (patch) | |
tree | d8834c8d50f3bd91b4f1735aa228ec0b2cc1edf9 /libs/hwui/DisplayList.h | |
parent | 2eb4ca6114a9e36a965110090947ef2124a366b6 (diff) |
Use typedefs to differentiate between flavors of DisplayLists
Change-Id: Id3b0a5aa045f2343fb046ca0889b375a7d00e03f
Diffstat (limited to 'libs/hwui/DisplayList.h')
-rw-r--r-- | libs/hwui/DisplayList.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/libs/hwui/DisplayList.h b/libs/hwui/DisplayList.h index 8ba9ac357414..80ff96a32fc1 100644 --- a/libs/hwui/DisplayList.h +++ b/libs/hwui/DisplayList.h @@ -58,8 +58,14 @@ class Layer; #if HWUI_NEW_OPS struct RecordedOp; struct RenderNodeOp; + +typedef RecordedOp BaseOpType; +typedef RenderNodeOp NodeOpType; #else class DrawRenderNodeOp; + +typedef DisplayListOp BaseOpType; +typedef DrawRenderNodeOp NodeOpType; #endif /** @@ -143,19 +149,12 @@ public: const std::vector<Chunk>& getChunks() const { return chunks; } -#if HWUI_NEW_OPS - const std::vector<RecordedOp*>& getOps() const { + const std::vector<BaseOpType*>& 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 + size_t addChild(NodeOpType* childOp); + const std::vector<NodeOpType*>& children() { return mChildren; } void ref(VirtualLightRefBase* prop) { mReferenceHolders.push_back(prop); @@ -169,18 +168,12 @@ public: } private: -#if HWUI_NEW_OPS - std::vector<RecordedOp*> ops; -#endif + std::vector<BaseOpType*> ops; 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<NodeOpType*> mChildren; std::vector<Chunk> chunks; |