aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContextOptions.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-05-29 06:46:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-29 06:46:47 -0700
commit7224c866321e4222ef452fc0c73ae05283a2227c (patch)
tree4f413c7e679c7a4fd04c966ca6d6b8298e18c349 /include/gpu/GrContextOptions.h
parente800657f2f8a42863481f5a4d7b0d698ecd94e4c (diff)
add context override of GeometryBufferMapThreshold
Diffstat (limited to 'include/gpu/GrContextOptions.h')
-rw-r--r--include/gpu/GrContextOptions.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index dfb352b507..d8d59fac3a 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -15,7 +15,8 @@ struct GrContextOptions {
: fDrawPathToCompressedTexture(false)
, fSuppressPrints(false)
, fMaxTextureSizeOverride(SK_MaxS32)
- , fSuppressDualSourceBlending(false) {}
+ , fSuppressDualSourceBlending(false)
+ , fGeometryBufferMapThreshold(1 << 15) {}
// EXPERIMENTAL
// May be removed in the future, or may become standard depending
@@ -31,6 +32,12 @@ struct GrContextOptions {
int fMaxTextureSizeOverride;
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;
};
#endif