Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: src/gpu/GrGpu.cpp

Issue 1262473004: Make GrGpu read/write pixels take GrSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index c61979bbfb1b17a839bc47a0dde17237c6962d07..c7137ef6918fb67141d0eee2b3840fbc114e15c9 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;
}
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698