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

Unified Diff: src/gpu/GrGpu.cpp

Issue 1534123003: More framework support for TransferBuffers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index a9b283f3cec8a836a743a2078bd5d6a95da31ada..328b07084434c4dd77601d8c4f4f2bc058b6fea7 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -336,6 +336,23 @@ bool GrGpu::writePixels(GrSurface* surface,
return false;
}
+bool GrGpu::transferPixels(GrSurface* surface,
+ int left, int top, int width, int height,
+ GrPixelConfig config, GrTransferBuffer* buffer,
+ size_t offset, size_t rowBytes) {
+ if (!buffer) {
bsalomon 2015/12/18 15:24:38 || !surface?
jvanverth1 2016/01/04 21:24:09 Done.
+ return false;
+ }
+
+ this->handleDirtyContext();
+ if (this->onTransferPixels(surface, left, top, width, height, config,
+ buffer, offset, rowBytes)) {
+ fStats.incTextureUploads();
bsalomon 2015/12/18 15:24:38 Worth tracking transfers differently from uploads?
jvanverth1 2016/01/04 21:24:09 Done.
+ return true;
+ }
+ return false;
+}
+
void GrGpu::resolveRenderTarget(GrRenderTarget* target) {
SkASSERT(target);
this->handleDirtyContext();
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrResourceProvider.h » ('j') | src/gpu/GrResourceProvider.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698