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

Commit 9a55cbc0 authored by Miao Wang's avatar Miao Wang Committed by Gerrit Code Review
Browse files

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

parents 5ad36d45 f0f6e80b
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();
    }
}