From bb0acdf9e1d862a7cf0e2533321fc1105c29b5e3 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 5 Mar 2012 13:44:35 -0800 Subject: Delete display list objects and resources on the UI thread Bug #6073717 Bug #6065504 Bug #6026515 Bug #5971725 Prior to this patch, the destructor of DisplayList would always run on the finalizer thread. This could cause a race condition if the UI thread was busy rendering display lists at the same time leading to various random native crashes. Change-Id: Ie11108e3b1538d4b358a1a8b4cce1b2d33152d0c --- libs/hwui/DisplayListRenderer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libs/hwui/DisplayListRenderer.h') diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h index 96b87cc..02f8438 100644 --- a/libs/hwui/DisplayListRenderer.h +++ b/libs/hwui/DisplayListRenderer.h @@ -119,16 +119,16 @@ public: static const char* OP_NAMES[]; - void initFromDisplayListRenderer(const DisplayListRenderer& recorder, bool reusing = false); - ANDROID_API size_t getSize(); + ANDROID_API static void destroyDisplayListDeferred(DisplayList* displayList); + ANDROID_API static void outputLogBuffer(int fd); + + void initFromDisplayListRenderer(const DisplayListRenderer& recorder, bool reusing = false); bool replay(OpenGLRenderer& renderer, Rect& dirty, int32_t flags, uint32_t level = 0); void output(OpenGLRenderer& renderer, uint32_t level = 0); - ANDROID_API static void outputLogBuffer(int fd); - void setRenderable(bool renderable) { mIsRenderable = renderable; } -- cgit v1.1