aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-02-26 14:32:39 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-26 20:43:18 +0000
commit5f33a8ccac141dfaddddc7b9fc39a8428cc233fe (patch)
treebc01188bd6ffbce272ce0bccb8f13da1163f26a8 /src/gpu/GrGpu.h
parent5ba448c21aa002055aa68942f1f50fd4cdfd8033 (diff)
Start on new GPU pixel ops implementation.
The new ops attempt to be less optimal by falling back to CPU conversions rather than relying on intermediate draws and complex coordination between GrContext and GrGpu to determine how conversions are performed. This adds the new writePixels implementation. Change-Id: I7496d86d5a40277ed2ca63668881c160e54d80d3 Reviewed-on: https://skia-review.googlesource.com/109880 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrGpu.h')
-rw-r--r--src/gpu/GrGpu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 96691e3322..7c3b796a52 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -297,6 +297,16 @@ public:
GrColorType, const void* buffer, size_t rowBytes);
/**
+ * This version of writePixels doesn't take an origin. TODO: Remove origin handling from
+ * GrGpu::writePixels entirely.
+ */
+ bool writePixels(GrSurface* surface, int left, int top, int width, int height,
+ GrColorType srcColorType, const void* buffer, size_t rowBytes) {
+ return this->writePixels(surface, kTopLeft_GrSurfaceOrigin, left, top, width, height,
+ srcColorType, buffer, rowBytes);
+ }
+
+ /**
* Updates the pixels in a rectangle of a texture using a buffer
*
* There are a couple of assumptions here. First, we only update the top miplevel.