Loading libs/hwui/DisplayListRenderer.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -68,6 +68,10 @@ DisplayList::DisplayList(const DisplayListRenderer& recorder) { } DisplayList::~DisplayList() { clearResources(); } void DisplayList::clearResources() { sk_free((void*) mReader.base()); Caches& caches = Caches::getInstance(); Loading Loading @@ -98,7 +102,7 @@ DisplayList::~DisplayList() { mMatrices.clear(); } void DisplayList::initFromDisplayListRenderer(const DisplayListRenderer& recorder) { void DisplayList::initFromDisplayListRenderer(const DisplayListRenderer& recorder, bool reusing) { const SkWriter32& writer = recorder.writeStream(); init(); Loading @@ -106,6 +110,11 @@ void DisplayList::initFromDisplayListRenderer(const DisplayListRenderer& recorde return; } if (reusing) { // re-using display list - clear out previous allocations clearResources(); } size_t size = writer.size(); void* buffer = sk_malloc_throw(size); writer.flatten(buffer); Loading Loading @@ -531,7 +540,7 @@ DisplayList* DisplayListRenderer::getDisplayList() { if (mDisplayList == NULL) { mDisplayList = new DisplayList(*this); } else { mDisplayList->initFromDisplayListRenderer(*this); mDisplayList->initFromDisplayListRenderer(*this, true); } return mDisplayList; } Loading libs/hwui/DisplayListRenderer.h +3 −1 Original line number Diff line number Diff line Loading @@ -102,13 +102,15 @@ public: static const char* OP_NAMES[]; void initFromDisplayListRenderer(const DisplayListRenderer& recorder); void initFromDisplayListRenderer(const DisplayListRenderer& recorder, bool reusing = false); bool replay(OpenGLRenderer& renderer, uint32_t level = 0); private: void init(); void clearResources(); class TextContainer { public: size_t length() const { Loading Loading
libs/hwui/DisplayListRenderer.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -68,6 +68,10 @@ DisplayList::DisplayList(const DisplayListRenderer& recorder) { } DisplayList::~DisplayList() { clearResources(); } void DisplayList::clearResources() { sk_free((void*) mReader.base()); Caches& caches = Caches::getInstance(); Loading Loading @@ -98,7 +102,7 @@ DisplayList::~DisplayList() { mMatrices.clear(); } void DisplayList::initFromDisplayListRenderer(const DisplayListRenderer& recorder) { void DisplayList::initFromDisplayListRenderer(const DisplayListRenderer& recorder, bool reusing) { const SkWriter32& writer = recorder.writeStream(); init(); Loading @@ -106,6 +110,11 @@ void DisplayList::initFromDisplayListRenderer(const DisplayListRenderer& recorde return; } if (reusing) { // re-using display list - clear out previous allocations clearResources(); } size_t size = writer.size(); void* buffer = sk_malloc_throw(size); writer.flatten(buffer); Loading Loading @@ -531,7 +540,7 @@ DisplayList* DisplayListRenderer::getDisplayList() { if (mDisplayList == NULL) { mDisplayList = new DisplayList(*this); } else { mDisplayList->initFromDisplayListRenderer(*this); mDisplayList->initFromDisplayListRenderer(*this, true); } return mDisplayList; } Loading
libs/hwui/DisplayListRenderer.h +3 −1 Original line number Diff line number Diff line Loading @@ -102,13 +102,15 @@ public: static const char* OP_NAMES[]; void initFromDisplayListRenderer(const DisplayListRenderer& recorder); void initFromDisplayListRenderer(const DisplayListRenderer& recorder, bool reusing = false); bool replay(OpenGLRenderer& renderer, uint32_t level = 0); private: void init(); void clearResources(); class TextContainer { public: size_t length() const { Loading