aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContextPriv.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/GrContextPriv.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/GrContextPriv.h')
-rw-r--r--src/gpu/GrContextPriv.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gpu/GrContextPriv.h b/src/gpu/GrContextPriv.h
index a26d15d26d..a2a45b5007 100644
--- a/src/gpu/GrContextPriv.h
+++ b/src/gpu/GrContextPriv.h
@@ -147,13 +147,16 @@ public:
size_t rowBytes = 0, uint32_t pixelOpsFlags = 0);
/**
- * Writes a rectangle of pixels to a surface.
+ * Writes a rectangle of pixels to a surface. There are currently two versions of this.
+ * writeSurfacePixels() is the older version which will be replaced by the more robust and
+ * maintainable (but perhaps slower) writeSurfacePixels2().
+ *
* @param dst the surface context to write to.
* @param left left edge of the rectangle to write (inclusive)
* @param top top edge of the rectangle to write (inclusive)
* @param width width of rectangle to write in pixels.
* @param height height of rectangle to write in pixels.
- * @param srcConfig the pixel config of the source buffer
+ * @param srcColorType the color type of the source buffer
* @param srcColorSpace color space of the source buffer
* @param buffer memory to read pixels from
* @param rowBytes number of bytes between consecutive rows. Zero
@@ -165,6 +168,9 @@ public:
bool writeSurfacePixels(GrSurfaceContext* dst, int left, int top, int width, int height,
GrColorType srcColorType, SkColorSpace* srcColorSpace,
const void* buffer, size_t rowBytes, uint32_t pixelOpsFlags = 0);
+ bool writeSurfacePixels2(GrSurfaceContext* dst, int left, int top, int width, int height,
+ GrColorType srcColorType, SkColorSpace* srcColorSpace,
+ const void* buffer, size_t rowBytes, uint32_t pixelOpsFlags = 0);
GrBackend getBackend() const { return fContext->fBackend; }