diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-19 16:06:44 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-19 21:17:15 +0000 |
commit | 19eaf2dbe785a06b76f11c2066c302f0aa89d5d2 (patch) | |
tree | 9bf1bcf8fe794da174ba19b1c5cfed84f0f274e5 /src/gpu/GrGpu.h | |
parent | 56dc04bdc160b71a1e77fdb9e30fde4e860077ae (diff) |
Revert "Revert "New read pixels implementation that is simpler but does all conversions on CPU.""
This reverts commit be5947c2f38a79b7c709accfb1047d8fd06a0227.
Bug: skia:
Change-Id: I06dc15b31042d7827511d0ac2a7f4262c3f09622
Reviewed-on: https://skia-review.googlesource.com/115079
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@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. |