diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-19 12:29:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-19 17:19:45 +0000 |
commit | c9a642edf2d1c7f5380fe829adbb1a692f9969a6 (patch) | |
tree | 8d5ee55a8ae11c14a5e14867baf52efa38851a2a /src/gpu/GrGpu.h | |
parent | 8430eace0bbf7258b25e42f289b6a63f38b075e7 (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/GrGpu.h')
-rw-r--r-- | src/gpu/GrGpu.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index 16561418aa..95c5117799 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -272,6 +272,15 @@ public: */ bool readPixels(GrSurface* surface, GrSurfaceOrigin, int left, int top, int width, int height, GrColorType dstColorType, void* buffer, size_t rowBytes); + /** + * This version of readPixels doesn't take an origin. TODO: Remove origin handling from + * GrGpu::readPixels entirely. + */ + bool readPixels(GrSurface* surface, int left, int top, int width, int height, + GrColorType dstColorType, void* buffer, size_t rowBytes) { + return this->readPixels(surface, kTopLeft_GrSurfaceOrigin, left, top, width, height, + dstColorType, buffer, rowBytes); + } /** * Updates the pixels in a rectangle of a surface. No sRGB/linear conversions are performed. |