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

Commit f0f6e80b authored by Miao Wang's avatar Miao Wang
Browse files

make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT

(Native RS)

Change-Id: I23041da03c2c928ceec76037804abb5dc7e6eb64
parent 53e8d6f9
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();
    }
}