From 397ff875b29ac6305d16e7225a646454ff0b5a07 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 13 Mar 2013 15:22:11 -0700 Subject: [PATCH] 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 --- services/surfaceflinger/SurfaceFlinger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 184f47e91..884d7edbe 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2783,7 +2783,7 @@ status_t SurfaceFlinger::captureScreenImplLocked( sp 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