diff options
author | bsalomon <bsalomon@google.com> | 2014-10-13 12:32:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-13 12:32:55 -0700 |
commit | 81beccc4fb1396fe94af15bfce26e68b82b93809 (patch) | |
tree | f3b05fc07e562022e6c5e82cbaae713817021c8d /include/gpu/GrContext.h | |
parent | 335a0ae19c3c26a934b2a25c0b8016a453c4b013 (diff) |
Devirtualize read/write pixels on surface.
Consolidate read/write funcs in context.
Remove support for reading pixels from a surface that's not a target. It's currently broken and neither used nor tested.
Review URL: https://codereview.chromium.org/648863002
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r-- | include/gpu/GrContext.h | 53 |
1 files changed, 4 insertions, 49 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 6d89d4668a..2b3b814397 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -630,53 +630,8 @@ public: uint32_t pixelOpsFlags = 0); /** - * Copy the src pixels [buffer, row bytes, pixel config] into a render target at the specified - * rectangle. - * @param target the render target to write into. NULL means the current render target. - * @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 buffer memory to read the rectangle 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 target and pixel configs. - */ - bool writeRenderTargetPixels(GrRenderTarget* target, - int left, int top, int width, int height, - GrPixelConfig config, const void* buffer, - size_t rowBytes = 0, - uint32_t pixelOpsFlags = 0); - - /** - * Reads a rectangle of pixels from a texture. - * @param texture the texture 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 config the pixel config of the destination buffer - * @param buffer memory to read the rectangle into. - * @param rowBytes number of bytes between 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 config. - */ - bool readTexturePixels(GrTexture* texture, - int left, int top, int width, int height, - GrPixelConfig config, void* buffer, - size_t rowBytes = 0, - uint32_t pixelOpsFlags = 0); - - /** - * Writes a rectangle of pixels to a texture. - * @param texture the render target to read from. + * Writes a rectangle of pixels to a surface. + * @param surface the surface to write to. * @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. @@ -687,9 +642,9 @@ public: * 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 texture and pixel configs. + * unsupported combination of surface and src configs. */ - bool writeTexturePixels(GrTexture* texture, + bool writeSurfacePixels(GrSurface* surface, int left, int top, int width, int height, GrPixelConfig config, const void* buffer, size_t rowBytes, |