diff options
author | 2015-05-29 06:46:47 -0700 | |
---|---|---|
committer | 2015-05-29 06:46:47 -0700 | |
commit | 7224c866321e4222ef452fc0c73ae05283a2227c (patch) | |
tree | 4f413c7e679c7a4fd04c966ca6d6b8298e18c349 /include/gpu/GrContextOptions.h | |
parent | e800657f2f8a42863481f5a4d7b0d698ecd94e4c (diff) |
add context override of GeometryBufferMapThreshold
BUG=skia:
Review URL: https://codereview.chromium.org/1159713006
Diffstat (limited to 'include/gpu/GrContextOptions.h')
-rw-r--r-- | include/gpu/GrContextOptions.h | 9 |
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 |