aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrCaps.h8
-rw-r--r--include/gpu/GrContextOptions.h4
-rw-r--r--include/gpu/GrTypesPriv.h30
3 files changed, 13 insertions, 29 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h
index 3ef8295e2b..1f5b11955b 100644
--- a/include/gpu/GrCaps.h
+++ b/include/gpu/GrCaps.h
@@ -247,9 +247,9 @@ public:
return fDrawPathMasksToCompressedTextureSupport;
}
- size_t bufferMapThreshold() const {
- SkASSERT(fBufferMapThreshold >= 0);
- return fBufferMapThreshold;
+ size_t geometryBufferMapThreshold() const {
+ SkASSERT(fGeometryBufferMapThreshold >= 0);
+ return fGeometryBufferMapThreshold;
}
bool supportsInstancedDraws() const {
@@ -301,7 +301,7 @@ protected:
GR_STATIC_ASSERT(kLast_GrBlendEquation < 32);
uint32_t fMapBufferFlags;
- int fBufferMapThreshold;
+ int fGeometryBufferMapThreshold;
int fMaxRenderTargetSize;
int fMaxVertexAttributes;
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index 4e763405e1..d7070db555 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -17,7 +17,7 @@ struct GrContextOptions {
, fMaxTextureSizeOverride(SK_MaxS32)
, fMaxTileSizeOverride(0)
, fSuppressDualSourceBlending(false)
- , fBufferMapThreshold(-1)
+ , fGeometryBufferMapThreshold(-1)
, fUseDrawInsteadOfPartialRenderTargetWrite(false)
, fImmediateMode(false)
, fClipBatchToBounds(false)
@@ -47,7 +47,7 @@ struct GrContextOptions {
/** the threshold in bytes above which we will use a buffer mapping API to map vertex and index
buffers to CPU memory in order to update them. A value of -1 means the GrContext should
deduce the optimal value for this platform. */
- int fBufferMapThreshold;
+ int fGeometryBufferMapThreshold;
/** some gpus have problems with partial writes of the rendertarget */
bool fUseDrawInsteadOfPartialRenderTargetWrite;
diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h
index bf8ea49063..a2facfa6cf 100644
--- a/include/gpu/GrTypesPriv.h
+++ b/include/gpu/GrTypesPriv.h
@@ -401,29 +401,13 @@ private:
};
/**
-* 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
+ * 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
};