Dawn: update to BufferCopyView API changes.

rowBytes -> bytesPerRow, imageHeight -> rowsPerImage.

Change-Id: I0dbe82c351ec00626cd6bb11468169b7bc18e8f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285837
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White 2020-04-28 13:29:28 -04:00 committed by Skia Commit-Bot
parent 5cf6b31fc8
commit 1b3f93d245
2 changed files with 6 additions and 6 deletions

View File

@ -369,8 +369,8 @@ GrBackendTexture GrDawnGpu::onCreateBackendTexture(SkISize dimensions,
wgpu::BufferCopyView srcBuffer;
srcBuffer.buffer = static_cast<GrDawnStagingBuffer*>(stagingBuffer.fBuffer)->buffer();
srcBuffer.offset = stagingBuffer.fOffset;
srcBuffer.rowPitch = rowBytes;
srcBuffer.imageHeight = h;
srcBuffer.bytesPerRow = rowBytes;
srcBuffer.rowsPerImage = h;
wgpu::TextureCopyView dstTexture;
dstTexture.texture = tex;
dstTexture.mipLevel = i;
@ -559,8 +559,8 @@ bool GrDawnGpu::onReadPixels(GrSurface* surface, int left, int top, int width, i
wgpu::BufferCopyView dstBuffer;
dstBuffer.buffer = buf;
dstBuffer.offset = 0;
dstBuffer.rowPitch = rowBytes;
dstBuffer.imageHeight = height;
dstBuffer.bytesPerRow = rowBytes;
dstBuffer.rowsPerImage = height;
wgpu::Extent3D copySize = {(uint32_t) width, (uint32_t) height, 1};
this->getCopyEncoder().CopyTextureToBuffer(&srcTexture, &dstBuffer, &copySize);

View File

@ -158,8 +158,8 @@ void GrDawnTexture::upload(GrColorType srcColorType, const GrMipLevel texels[],
wgpu::BufferCopyView srcBuffer;
srcBuffer.buffer = static_cast<GrDawnStagingBuffer*>(slice.fBuffer)->buffer();
srcBuffer.offset = slice.fOffset;
srcBuffer.rowPitch = dstRowBytes;
srcBuffer.imageHeight = height;
srcBuffer.bytesPerRow = dstRowBytes;
srcBuffer.rowsPerImage = height;
wgpu::TextureCopyView dstTexture;
dstTexture.texture = fInfo.fTexture;