aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-06-01 15:04:28 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-02 00:00:56 +0000
commita9b04b90669e08c1ee4aa826a83c416b24704248 (patch)
tree01fd326b461a8d2065c0cd70f367dba0806318ba /src/gpu/GrGpu.cpp
parent257c1fb7524db283f43ac3d3813e917cbe522e81 (diff)
Remove origin from GrGpu::writePixels
Change-Id: Iea3d68d282420f28623ebea315499fbd7ad9d471 Reviewed-on: https://skia-review.googlesource.com/131526 Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r--src/gpu/GrGpu.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 083a125bab..7f60129d51 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -232,9 +232,8 @@ bool GrGpu::readPixels(GrSurface* surface, GrSurfaceOrigin origin, int left, int
rowBytes);
}
-bool GrGpu::writePixels(GrSurface* surface, GrSurfaceOrigin origin, int left, int top, int width,
- int height, GrColorType srcColorType, const GrMipLevel texels[],
- int mipLevelCount) {
+bool GrGpu::writePixels(GrSurface* surface, int left, int top, int width, int height,
+ GrColorType srcColorType, const GrMipLevel texels[], int mipLevelCount) {
SkASSERT(surface);
if (1 == mipLevelCount) {
// We require that if we are not mipped, then the write region is contained in the surface
@@ -255,23 +254,16 @@ bool GrGpu::writePixels(GrSurface* surface, GrSurfaceOrigin origin, int left, in
}
this->handleDirtyContext();
- if (this->onWritePixels(surface, origin, left, top, width, height, srcColorType, texels,
+ if (this->onWritePixels(surface, left, top, width, height, srcColorType, texels,
mipLevelCount)) {
SkIRect rect = SkIRect::MakeXYWH(left, top, width, height);
- this->didWriteToSurface(surface, origin, &rect, mipLevelCount);
+ this->didWriteToSurface(surface, kTopLeft_GrSurfaceOrigin, &rect, mipLevelCount);
fStats.incTextureUploads();
return true;
}
return false;
}
-bool GrGpu::writePixels(GrSurface* surface, GrSurfaceOrigin origin, int left, int top, int width,
- int height, GrColorType srcColorType, const void* buffer, size_t rowBytes) {
- GrMipLevel mipLevel = { buffer, rowBytes };
-
- return this->writePixels(surface, origin, left, top, width, height, srcColorType, &mipLevel, 1);
-}
-
bool GrGpu::transferPixels(GrTexture* texture, int left, int top, int width, int height,
GrColorType bufferColorType, GrBuffer* transferBuffer, size_t offset,
size_t rowBytes) {