diff options
author | 2017-04-06 07:59:41 -0400 | |
---|---|---|
committer | 2017-04-06 12:45:02 +0000 | |
commit | e78b7259c3d5cbed77b4390150cfb699b0b59cd4 (patch) | |
tree | b31944a68b1c88c5f87d2023157b473f01348feb /include/gpu/GrContext.h | |
parent | 43b9c6bbf66b0927a99062c68dff9ea8358f82db (diff) |
Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv (take 3)
This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling.
This is a re-reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv)
Change-Id: Icfb9dd223418dd460405efd2bfd9d1c356beed1a
Reviewed-on: https://skia-review.googlesource.com/11412
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r-- | include/gpu/GrContext.h | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index ccd27286c7..0987d96b2e 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -246,68 +246,6 @@ public: */ void flush(); - /** - * These flags can be used with the read/write pixels functions below. - */ - enum PixelOpsFlags { - /** The GrContext will not be flushed before the surface read or write. This means that - the read or write may occur before previous draws have executed. */ - kDontFlush_PixelOpsFlag = 0x1, - /** Any surface writes should be flushed to the backend 3D API after the surface operation - is complete */ - kFlushWrites_PixelOp = 0x2, - /** The src for write or dst read is unpremultiplied. This is only respected if both the - config src and dst configs are an RGBA/BGRA 8888 format. */ - kUnpremul_PixelOpsFlag = 0x4, - }; - - /** - * Reads a rectangle of pixels from a surface. - * @param surface the surface to read from. - * @param srcColorSpace color space of the surface - * @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 config the pixel config 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 - * packed. - * @param pixelOpsFlags see PixelOpsFlags enum above. - * - * @return true if the read succeeded, false if not. The read can fail because of an unsupported - * pixel configs - */ - bool readSurfacePixels(GrSurface* surface, SkColorSpace* srcColorSpace, - int left, int top, int width, int height, - GrPixelConfig config, SkColorSpace* dstColorSpace, void* buffer, - size_t rowBytes = 0, - uint32_t pixelOpsFlags = 0); - - /** - * Writes a rectangle of pixels to a surface. - * @param surface the surface to write to. - * @param dstColorSpace color space of the surface - * @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 config the pixel config 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 - * means rows are tightly packed. - * @param pixelOpsFlags see PixelOpsFlags enum above. - * @return true if the write succeeded, false if not. The write can fail because of an - * unsupported combination of surface and src configs. - */ - bool writeSurfacePixels(GrSurface* surface, SkColorSpace* dstColorSpace, - int left, int top, int width, int height, - GrPixelConfig config, SkColorSpace* srcColorSpace, const void* buffer, - size_t rowBytes, - uint32_t pixelOpsFlags = 0); - /** * An ID associated with this context, guaranteed to be unique. */ |