summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/DisplayListRenderer.cpp11
-rw-r--r--libs/hwui/DisplayListRenderer.h4
2 files changed, 6 insertions, 9 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index 8b1caeee..886c05c 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -883,7 +883,6 @@ bool DisplayList::replay(OpenGLRenderer& renderer, Rect& dirty, uint32_t level)
///////////////////////////////////////////////////////////////////////////////
DisplayListRenderer::DisplayListRenderer(): mWriter(MIN_WRITER_SIZE) {
- mDisplayList = NULL;
}
DisplayListRenderer::~DisplayListRenderer() {
@@ -923,13 +922,13 @@ void DisplayListRenderer::reset() {
// Operations
///////////////////////////////////////////////////////////////////////////////
-DisplayList* DisplayListRenderer::getDisplayList() {
- if (mDisplayList == NULL) {
- mDisplayList = new DisplayList(*this);
+DisplayList* DisplayListRenderer::getDisplayList(DisplayList* displayList) {
+ if (!displayList) {
+ displayList = new DisplayList(*this);
} else {
- mDisplayList->initFromDisplayListRenderer(*this, true);
+ displayList->initFromDisplayListRenderer(*this, true);
}
- return mDisplayList;
+ return displayList;
}
void DisplayListRenderer::setViewport(int width, int height) {
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index b83259f..8157631 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -217,7 +217,7 @@ public:
DisplayListRenderer();
~DisplayListRenderer();
- DisplayList* getDisplayList();
+ DisplayList* getDisplayList(DisplayList* displayList);
void setViewport(int width, int height);
void prepareDirty(float left, float top, float right, float bottom, bool opaque);
@@ -474,8 +474,6 @@ private:
SkWriter32 mWriter;
- DisplayList *mDisplayList;
-
int mRestoreSaveCount;
friend class DisplayList;