Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ed751dd authored by John Reck's avatar John Reck
Browse files

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
parent 1f3f55b4
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -909,7 +909,6 @@ public class RenderNode {
    @Override
    @Override
    protected void finalize() throws Throwable {
    protected void finalize() throws Throwable {
        try {
        try {
            destroyDisplayListData();
            nDestroyDisplayList(mNativeDisplayList);
            nDestroyDisplayList(mNativeDisplayList);
        } finally {
        } finally {
            super.finalize();
            super.finalize();
+1 −0
Original line number Original line Diff line number Diff line
@@ -253,6 +253,7 @@ public class ThreadedRenderer extends HardwareRenderer {
    protected void finalize() throws Throwable {
    protected void finalize() throws Throwable {
        try {
        try {
            nDeleteProxy(mNativeProxy);
            nDeleteProxy(mNativeProxy);
            mNativeProxy = 0;
        } finally {
        } finally {
            super.finalize();
            super.finalize();
        }
        }