diff options
author | joshualitt <joshualitt@chromium.org> | 2015-06-01 14:17:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-01 14:17:47 -0700 |
commit | e5b74c68564baab3639b21a95ce5b4b92949ca27 (patch) | |
tree | 30f00f307c4e97f5c6eb0b9f2fedf1b64a1f0352 /include | |
parent | 933d9863dd4d6d6acdd024d90969110a286e1656 (diff) |
Set GeometryBufferMapThreshold defaults
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1161543003
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrCaps.h | 3 | ||||
-rw-r--r-- | include/gpu/GrContextOptions.h | 11 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index 38cf9019cf..f219cb23e0 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -203,6 +203,7 @@ public: } size_t geometryBufferMapThreshold() const { + SkASSERT(fGeometryBufferMapThreshold >= 0); return fGeometryBufferMapThreshold; } @@ -229,6 +230,7 @@ protected: BlendEquationSupport fBlendEquationSupport; uint32_t fMapBufferFlags; + int fGeometryBufferMapThreshold; int fMaxRenderTargetSize; int fMaxTextureSize; @@ -242,7 +244,6 @@ protected: private: bool fSupressPrints : 1; bool fDrawPathMasksToCompressedTextureSupport : 1; - size_t fGeometryBufferMapThreshold; typedef SkRefCnt INHERITED; }; diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h index 231aa30a3f..057bc83d19 100644 --- a/include/gpu/GrContextOptions.h +++ b/include/gpu/GrContextOptions.h @@ -17,7 +17,7 @@ struct GrContextOptions { , fMaxTextureSizeOverride(SK_MaxS32) , fMinTextureSizeOverride(0) , fSuppressDualSourceBlending(false) - , fGeometryBufferMapThreshold(1 << 15) {} + , fGeometryBufferMapThreshold(-1) {} // EXPERIMENTAL // May be removed in the future, or may become standard depending @@ -35,11 +35,10 @@ struct GrContextOptions { int fMinTextureSizeOverride; bool fSuppressDualSourceBlending; - /** fGeometryBufferMapThreshold gives a threshold (in bytes) for when Gr should - map a GrGeometryBuffer to update its contents. It will use map() if the - size of the updated region is greater than the threshold. Otherwise it will - use updateData(). */ - size_t fGeometryBufferMapThreshold; + /** 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 fGeometryBufferMapThreshold; }; #endif |