aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContextPriv.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-19 12:29:39 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-19 17:19:45 +0000
commitc9a642edf2d1c7f5380fe829adbb1a692f9969a6 (patch)
tree8d5ee55a8ae11c14a5e14867baf52efa38851a2a /src/gpu/GrContextPriv.h
parent8430eace0bbf7258b25e42f289b6a63f38b075e7 (diff)
New read pixels implementation that is simpler but does all conversions on CPU.
Change-Id: Ia548cd24a8544b35a233311706faf48de353b7cf Reviewed-on: https://skia-review.googlesource.com/109902 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@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 f7bd911b1e..61ff3c1e34 100644
--- a/src/gpu/GrContextPriv.h
+++ b/src/gpu/GrContextPriv.h
@@ -128,13 +128,16 @@ public:
};
/**
- * Reads a rectangle of pixels from a surface.
+ * Reads a rectangle of pixels from a surface. There are currently two versions of this.
+ * readSurfacePixels() is the older version which will be replaced by the more robust and
+ * maintainable (but perhaps slower) readSurfacePixels2().
+ *
* @param src the surface context to read from.
* @param left left edge of the rectangle to read (inclusive)
* @param top top edge of the rectangle to read (inclusive)
* @param width width of rectangle to read in pixels.
* @param height height of rectangle to read in pixels.
- * @param dstConfig the pixel config of the destination buffer
+ * @param dstColorType the color type of the destination buffer
* @param dstColorSpace color space of the destination buffer
* @param buffer memory to read the rectangle into.
* @param rowBytes number of bytes bewtween consecutive rows. Zero means rows are tightly
@@ -147,6 +150,9 @@ public:
bool readSurfacePixels(GrSurfaceContext* src, int left, int top, int width, int height,
GrColorType dstColorType, SkColorSpace* dstColorSpace, void* buffer,
size_t rowBytes = 0, uint32_t pixelOpsFlags = 0);
+ bool readSurfacePixels2(GrSurfaceContext* src, int left, int top, int width, int height,
+ GrColorType dstColorType, SkColorSpace* dstColorSpace, void* buffer,
+ size_t rowBytes = 0, uint32_t pixelOpsFlags = 0);
/**
* Writes a rectangle of pixels to a surface. There are currently two versions of this.