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

Commit 5474f339 authored by Thierry Strudel's avatar Thierry Strudel Committed by Pat Tjin
Browse files

SurfaceControl: free ref when not used anymore



C standard does not ensure order in which arguments are evaluated leading to
faulty behavior in x86 case.

Bug: 17206275

Change-Id: I6553c55bcf646d93413135aed733f20b91852735
Signed-off-by: default avatarThierry Strudel <thierry.strudel@intel.com>
parent f9220b39
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();