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

Commit 4bd2c00d 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...

Merge "make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)" automerge: 9a55cbc0
automerge: 58fd96c6

* commit '58fd96c6':
  make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)
parents c7e6b93a 58fd96c6
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1882,4 +1882,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();
    }
}