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

Commit 58fd96c6 authored by Miao Wang's avatar Miao Wang Committed by android-build-merger
Browse files

Merge "make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)"

automerge: 9a55cbc0

* commit '9a55cbc0':
  make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)
parents af6eaf65 9a55cbc0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1878,4 +1878,15 @@ public class Allocation extends BaseObj {
        }
    }

    /**
     * For USAGE_IO_OUTPUT, destroy() implies setSurface(null).
     *
     */
    @Override
    public void destroy() {
        if((mUsage & USAGE_IO_OUTPUT) != 0) {
            setSurface(null);
        }
        super.destroy();
    }
}