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

Unified Diff: src/gpu/GrGpu.h

Issue 1490473003: Add transfer buffer support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Some clean up 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
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrGpu.cpp » ('j') | src/gpu/GrTransferBuffer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.h
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index c5fa61bd99851d9b9e5a58d56d14f5a7c7f7573b..4051e69097d236493b362f0702c2f21dff0efa30 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -31,6 +31,7 @@ class GrRenderTarget;
class GrStencilAttachment;
class GrSurface;
class GrTexture;
+class GrTransferBuffer;
class GrVertexBuffer;
class GrVertices;
@@ -129,6 +130,17 @@ public:
GrIndexBuffer* createIndexBuffer(size_t size, bool dynamic);
/**
+ * Creates a transfer buffer.
+ *
+ * @param size size in bytes of the index buffer
+ * @param toGpu true if used to transfer from the cpu to the gpu
bsalomon 2015/12/02 16:38:31 Maybe an enum instead of a bool for clarity at the
jvanverth1 2015/12/02 18:05:07 Done.
+ * otherwise to be used to transfer from the gpu to the cpu
+ *
+ * @return The transfer buffer if successful, otherwise nullptr.
+ */
+ GrTransferBuffer* createTransferBuffer(size_t size, bool toGpu);
+
+ /**
* Resolves MSAA.
*/
void resolveRenderTarget(GrRenderTarget* target);
@@ -450,6 +462,7 @@ private:
GrWrapOwnership) = 0;
virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) = 0;
virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) = 0;
+ virtual GrTransferBuffer* onCreateTransferBuffer(size_t size, bool toGpu) = 0;
// overridden by backend-specific derived class to perform the clear.
virtual void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) = 0;
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrGpu.cpp » ('j') | src/gpu/GrTransferBuffer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698