summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2013-03-13 15:22:11 -0700
committer Mathias Agopian <mathias@google.com> 2013-03-13 15:22:11 -0700
commit6a531717cddf1d30be0946884d21c27e5b6b390c (patch)
tree6acba40d18452b9ce1d7ca4f700c1c81e1059de3
parent35ffa6a868f1aa650c90956a4129bb70f780fc99 (diff)
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
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index c0ce6590d3..98f6dedcc7 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -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