From 0ed751dd22a98f0c1f637570c5775b4f5e97d895 Mon Sep 17 00:00:00 2001 From: John Reck Date: Tue, 8 Apr 2014 14:10:17 -0700 Subject: Don't make HardwareRenderer calls in the finalizer Bug: 13902530 Don't try to set the RenderNode's displayListData to 0 in the finalizer. The HardwareRenderer may have already been finalized and it's not valid to make calls into HardwareRenderer from another thread anyway. The fix is that now that RenderNode is a refcounted object, this step can be skipped entirely. The RenderNode destructor handles deleting its DisplayListData if it needs to. Change-Id: Ieab75575b98c24678a531dd5aa41a2d0afde0eef --- core/java/android/view/ThreadedRenderer.java | 1 + 1 file changed, 1 insertion(+) (limited to 'core/java/android/view/ThreadedRenderer.java') diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java index 3d143d7..a747ab6 100644 --- a/core/java/android/view/ThreadedRenderer.java +++ b/core/java/android/view/ThreadedRenderer.java @@ -253,6 +253,7 @@ public class ThreadedRenderer extends HardwareRenderer { protected void finalize() throws Throwable { try { nDeleteProxy(mNativeProxy); + mNativeProxy = 0; } finally { super.finalize(); } -- cgit v1.1