Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1161543003: Set GeometryBufferMapThreshold defaults (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 13ce5070a6047a9ada81f5a7cfdf7d59bcdeacb2..179a48d4c5be3610a72447fbfb3dcc14e0dfe5a6 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -271,6 +271,12 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
}
}
+ // 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) {
+ fGeometryBufferMapThreshold = ctxInfo.isChromium() ? 0 : SK_MaxS32;
+ }
+
if (kGL_GrGLStandard == standard) {
SkASSERT(ctxInfo.version() >= GR_GL_VER(2,0) ||
ctxInfo.hasExtension("GL_ARB_texture_non_power_of_two"));
« no previous file with comments | « include/gpu/GrContextOptions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698