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

Commit 397ff875 authored by Mathias Agopian's avatar Mathias Agopian Committed by The Android Automerger
Browse files

size IMemoryHeap properly for screenshots

since we're using glReadPixels(), we only need to use
the width (as opposed to the stride) of the source
screenshot.

Bug: 8374664
Change-Id: I145c80f4fff5444df7c77c4f52e70a7203caddbd
parent b4477d56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2783,7 +2783,7 @@ status_t SurfaceFlinger::captureScreenImplLocked(
            sp<GraphicBuffer> buf(consumer->getCurrentBuffer());
            sw = buf->getWidth();
            sh = buf->getHeight();
            size_t size = buf->getStride() * sh * 4;
            size_t size = sw * sh * 4;

            // allocate shared memory large enough to hold the
            // screen capture