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

Commit 6a531717 authored by Mathias Agopian's avatar Mathias Agopian
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 35ffa6a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2787,7 +2787,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