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

Commit d34dc85f authored by Stephen Hines's avatar Stephen Hines
Browse files

We can only optimize bitmaps that have USAGE_SHARED.

Change-Id: I1149a9e25738da5ee348e3c18e7fdd7c1948e89e
parent a2303750
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1172,7 +1172,7 @@ public class Allocation extends BaseObj {
        // enable optimized bitmap path only with no mipmap and script-only usage
        if (mips == MipmapControl.MIPMAP_NONE &&
            t.getElement().isCompatible(Element.RGBA_8888(rs)) &&
            usage == USAGE_SCRIPT) {
            usage == (USAGE_SHARED | USAGE_SCRIPT)) {
            int id = rs.nAllocationCreateBitmapBackedAllocation(t.getID(rs), mips.mID, b, usage);
            if (id == 0) {
                throw new RSRuntimeException("Load failed.");