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

Unified Diff: include/gpu/GrTypesPriv.h

Issue 1825393002: Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: asserts Created 4 years, 9 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 | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrBatchAtlas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrTypesPriv.h
diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h
index a2facfa6cfc0f2c65d95fda4c96646323e68a202..bf8ea4906352ed9c98c2ed8e3cb37594337e47a6 100644
--- a/include/gpu/GrTypesPriv.h
+++ b/include/gpu/GrTypesPriv.h
@@ -401,13 +401,29 @@ private:
};
/**
- * Indicates the transfer direction for a transfer buffer
- */
-enum TransferType {
- /** Caller intends to use the buffer to transfer data to the GPU */
- kCpuToGpu_TransferType,
- /** Caller intends to use the buffer to transfer data from the GPU */
- kGpuToCpu_TransferType
+* Indicates the type of data that a GPU buffer will be used for.
+*/
+enum GrBufferType {
+ kVertex_GrBufferType,
+ kIndex_GrBufferType,
+ kXferCpuToGpu_GrBufferType,
+ kXferGpuToCpu_GrBufferType,
+
+ kLast_GrBufferType = kXferGpuToCpu_GrBufferType
+};
+
+/**
+* Provides a performance hint regarding the frequency at which a data store will be accessed.
+*/
+enum GrAccessPattern {
+ /** Data store will be respecified repeatedly and used many times. */
+ kDynamic_GrAccessPattern,
+ /** Data store will be specified once and used many times. (Thus disqualified from caching.) */
+ kStatic_GrAccessPattern,
+ /** Data store will be specified once and used at most a few times. (Also can't be cached.) */
+ kStream_GrAccessPattern,
+
+ kLast_GrAccessPattern = kStream_GrAccessPattern
};
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | src/gpu/GrBatchAtlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698