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
This commit is contained in:
parent
b4477d5638
commit
397ff875b2
@ -2783,7 +2783,7 @@ status_t SurfaceFlinger::captureScreenImplLocked(
|
|||||||
sp<GraphicBuffer> buf(consumer->getCurrentBuffer());
|
sp<GraphicBuffer> buf(consumer->getCurrentBuffer());
|
||||||
sw = buf->getWidth();
|
sw = buf->getWidth();
|
||||||
sh = buf->getHeight();
|
sh = buf->getHeight();
|
||||||
size_t size = buf->getStride() * sh * 4;
|
size_t size = sw * sh * 4;
|
||||||
|
|
||||||
// allocate shared memory large enough to hold the
|
// allocate shared memory large enough to hold the
|
||||||
// screen capture
|
// screen capture
|
||||||
|
Loading…
Reference in New Issue
Block a user