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/GrContextPriv.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/GrContextPriv.h')
-rw-r--r-- | src/gpu/GrContextPriv.h | 10 |
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. |