Fix height calculation when doing copyImageToBuffer
The bug only manifested when we were forcing copies from the origin. Bug: skia: Change-Id: I63f17ad9282b10f0d9c9c9ef38031faad32e20a3 Reviewed-on: https://skia-review.googlesource.com/110445 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
a021f85cc6
commit
3cdfa09a2f
@ -1982,8 +1982,9 @@ bool GrVkGpu::onReadPixels(GrSurface* surface, GrSurfaceOrigin origin, int left,
|
||||
}
|
||||
|
||||
size_t transBufferRowBytes = bpp * region.imageExtent.width;
|
||||
size_t imageRows = bpp * region.imageExtent.height;
|
||||
GrVkTransferBuffer* transferBuffer =
|
||||
static_cast<GrVkTransferBuffer*>(this->createBuffer(transBufferRowBytes * height,
|
||||
static_cast<GrVkTransferBuffer*>(this->createBuffer(transBufferRowBytes * imageRows,
|
||||
kXferGpuToCpu_GrBufferType,
|
||||
kStream_GrAccessPattern));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user