aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-06-26 11:38:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-26 11:38:25 -0700
commitbc233750163ffd48308a687dedea4464e55c0fa9 (patch)
tree85db053e12c9b0941310c814a182a2fc4b45f761 /src/gpu/gl/GrGLCaps.cpp
parent05a2ac2872a8d7c5437bcce1b0828e20b4bb0eb4 (diff)
Turn off buffer mapping in Chromium
BUG=chromium:496224 Review URL: https://codereview.chromium.org/1211363006
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 22fd053c1d..69580ec3d2 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -377,7 +377,14 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
// On many GPUs, map memory is very expensive, so we effectively disable it here by setting the
// threshold to the maximum unless the client gives us a hint that map memory is cheap.
if (fGeometryBufferMapThreshold < 0) {
+ // We think mapping on Chromium will be cheaper once we know ahead of time how much space
+ // we will use for all GrBatchs. Right now we might wind up mapping a large buffer and using
+ // a small subset.
+#if 0
fGeometryBufferMapThreshold = kChromium_GrGLDriver == ctxInfo.driver() ? 0 : SK_MaxS32;
+#else
+ fGeometryBufferMapThreshold = SK_MaxS32;
+#endif
}
if (kGL_GrGLStandard == standard) {