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

Commit d695293c authored by Jim Shargo's avatar Jim Shargo Committed by Android (Google) Code Review
Browse files

Merge "surface: Update the native alloc flag to read-only version" into main

parents 7883b31d 8485497c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1256,13 +1256,13 @@ public class Surface implements Parcelable {
    }

    private static void registerNativeMemoryUsage() {
        if (Flags.enableSurfaceNativeAllocRegistration()) {
        if (Flags.enableSurfaceNativeAllocRegistrationRo()) {
            VMRuntime.getRuntime().registerNativeAllocation(SURFACE_NATIVE_ALLOCATION_SIZE_BYTES);
        }
    }

    private static void freeNativeMemoryUsage() {
        if (Flags.enableSurfaceNativeAllocRegistration()) {
        if (Flags.enableSurfaceNativeAllocRegistrationRo()) {
            VMRuntime.getRuntime().registerNativeFree(SURFACE_NATIVE_ALLOCATION_SIZE_BYTES);
        }
    }