aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.cpp
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2017-06-21 15:55:46 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-22 13:14:01 +0000
commit2e5eaf022e9389b1382cc856fcd7a8e90a078e13 (patch)
tree99948f1cd1d90d74538e17c972f102268a9e64be /src/gpu/GrGpu.cpp
parent222958d5cbd46af9e643eb77186efceb176dd95d (diff)
Revert "Revert "Clean up onTransferPixels""
Bug: skia:5126 Change-Id: Ia1eaef56cca266ad4c413e711e63646e913222be Reviewed-on: https://skia-review.googlesource.com/20445 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r--src/gpu/GrGpu.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 262f155c24..e0766a730f 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -389,30 +389,24 @@ bool GrGpu::writePixels(GrSurface* surface,
return this->writePixels(surface, left, top, width, height, config, texels);
}
-bool GrGpu::transferPixels(GrSurface* surface,
+bool GrGpu::transferPixels(GrTexture* texture,
int left, int top, int width, int height,
GrPixelConfig config, GrBuffer* transferBuffer,
- size_t offset, size_t rowBytes, GrFence* fence) {
+ size_t offset, size_t rowBytes) {
SkASSERT(transferBuffer);
- SkASSERT(fence);
// We don't allow conversion between integer configs and float/fixed configs.
- if (GrPixelConfigIsSint(surface->config()) != GrPixelConfigIsSint(config)) {
+ if (GrPixelConfigIsSint(texture->config()) != GrPixelConfigIsSint(config)) {
return false;
}
this->handleDirtyContext();
- if (this->onTransferPixels(surface, left, top, width, height, config,
+ if (this->onTransferPixels(texture, left, top, width, height, config,
transferBuffer, offset, rowBytes)) {
SkIRect rect = SkIRect::MakeXYWH(left, top, width, height);
- this->didWriteToSurface(surface, &rect);
+ this->didWriteToSurface(texture, &rect);
fStats.incTransfersToTexture();
- if (*fence) {
- this->deleteFence(*fence);
- }
- *fence = this->insertFence();
-
return true;
}
return false;