From 7224c866321e4222ef452fc0c73ae05283a2227c Mon Sep 17 00:00:00 2001 From: joshualitt Date: Fri, 29 May 2015 06:46:47 -0700 Subject: add context override of GeometryBufferMapThreshold BUG=skia: Review URL: https://codereview.chromium.org/1159713006 --- include/gpu/GrContextOptions.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/gpu/GrContextOptions.h') 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 -- cgit v1.2.3