diff options
author | 2015-07-30 07:34:27 -0700 | |
---|---|---|
committer | 2015-07-30 07:34:27 -0700 | |
commit | 6cb3cbe8e67db5fb94ba7d98f60833229b008544 (patch) | |
tree | ab6e912ef2f18d97ef580293dfedb682da4e6c2d /src/gpu/GrGpu.cpp | |
parent | 8317a1832f55e175531ee7ae7ccd12a3a15e3c75 (diff) |
Make GrGpu read/write pixels take GrSurface
Review URL: https://codereview.chromium.org/1262473004
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r-- | src/gpu/GrGpu.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp index c61979bbfb..c7137ef691 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp @@ -287,22 +287,20 @@ bool GrGpu::getWritePixelsInfo(GrSurface* dstSurface, int width, int height, siz return true; } -bool GrGpu::readPixels(GrRenderTarget* target, +bool GrGpu::readPixels(GrSurface* surface, int left, int top, int width, int height, GrPixelConfig config, void* buffer, size_t rowBytes) { this->handleDirtyContext(); - return this->onReadPixels(target, left, top, width, height, - config, buffer, rowBytes); + return this->onReadPixels(surface, left, top, width, height, config, buffer, rowBytes); } -bool GrGpu::writeTexturePixels(GrTexture* texture, - int left, int top, int width, int height, - GrPixelConfig config, const void* buffer, - size_t rowBytes) { +bool GrGpu::writePixels(GrSurface* surface, + int left, int top, int width, int height, + GrPixelConfig config, const void* buffer, + size_t rowBytes) { this->handleDirtyContext(); - if (this->onWriteTexturePixels(texture, left, top, width, height, - config, buffer, rowBytes)) { + if (this->onWritePixels(surface, left, top, width, height, config, buffer, rowBytes)) { fStats.incTextureUploads(); return true; } |