summaryrefslogtreecommitdiff
path: root/libs/hwui/DisplayList.h
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2016-09-27 16:04:42 -0400
committerDerek Sollenberger <djsollen@google.com>2016-10-05 15:28:27 -0400
commit0df6209a02d0ea99d2dff3a46ed9febd5925df4b (patch)
treef0ae38776b4dc08456f111dd61076ba0a9394119 /libs/hwui/DisplayList.h
parent4306608707ad24af2b9a7c5764412e429329eab3 (diff)
Initial refactoring to enable the addition of the SkiaOpenGLPipeline.
Test: existing and new HWUI unit tests all pass. Change-Id: I4f5c1dc839a2ed15d8b0f6245fe030684501b083
Diffstat (limited to 'libs/hwui/DisplayList.h')
-rw-r--r--libs/hwui/DisplayList.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/libs/hwui/DisplayList.h b/libs/hwui/DisplayList.h
index c5d87676b7ff..06b08919732f 100644
--- a/libs/hwui/DisplayList.h
+++ b/libs/hwui/DisplayList.h
@@ -17,6 +17,7 @@
#pragma once
#include <SkCamera.h>
+#include <SkDrawable.h>
#include <SkMatrix.h>
#include <private/hwui/DrawGlInfo.h>
@@ -36,6 +37,7 @@
#include "GlFunctorLifecycleListener.h"
#include "Matrix.h"
#include "RenderProperties.h"
+#include "TreeInfo.h"
#include <vector>
@@ -89,7 +91,7 @@ public:
};
DisplayList();
- ~DisplayList();
+ virtual ~DisplayList();
// index of DisplayListOp restore, after which projected descendants should be drawn
int projectionReceiveIndex;
@@ -100,8 +102,6 @@ public:
const LsaVector<NodeOpType*>& getChildren() const { return children; }
const LsaVector<const SkBitmap*>& getBitmapResources() const { return bitmapResources; }
- const LsaVector<FunctorContainer>& getFunctors() const { return functors; }
- const LsaVector<VectorDrawableRoot*>& getVectorDrawables() const { return vectorDrawables; }
size_t addChild(NodeOpType* childOp);
@@ -113,15 +113,26 @@ public:
size_t getUsedSize() {
return allocator.usedSize();
}
- bool isEmpty() {
- return ops.empty();
+
+ virtual bool isEmpty() const { return ops.empty(); }
+ virtual bool hasFunctor() const { return !functors.empty(); }
+ virtual bool hasVectorDrawables() const { return !vectorDrawables.empty(); }
+ virtual bool isSkiaDL() const { return false; }
+ virtual bool reuseDisplayList(RenderNode* node, renderthread::CanvasContext* context) {
+ return false;
}
-private:
+ virtual void syncContents();
+ virtual void updateChildren(std::function<void(RenderNode*)> updateFn);
+ virtual bool prepareListAndChildren(TreeInfo& info, bool functorsNeedLayer,
+ std::function<void(RenderNode*, TreeInfo&, bool)> childFn);
+
+protected:
// allocator into which all ops and LsaVector arrays allocated
LinearAllocator allocator;
LinearStdAllocator<void*> stdAllocator;
+private:
LsaVector<Chunk> chunks;
LsaVector<BaseOpType*> ops;