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

Commit 5fa3f3a9 authored by Pat Tjin's avatar Pat Tjin Committed by Android (Google) Code Review
Browse files

Merge "SurfaceControl: free ref when not used anymore" into lmp-dev

parents c9991c71 5474f339
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -180,7 +180,8 @@ static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz,
        // takes ownership of ScreenshotClient
        SkMallocPixelRef* pixels = SkMallocPixelRef::NewWithProc(screenshotInfo,
                (size_t) rowBytes, NULL, (void*) screenshot->getPixels(), &DeleteScreenshot,
                (void*) (screenshot.detach()));
                (void*) (screenshot.get()));
        screenshot.detach();
        pixels->setImmutable();
        bitmap->setPixelRef(pixels)->unref();
        bitmap->lockPixels();