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

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 2473933002: Enable WebGL 2 by default! (on desktop) (Closed)
Patch Set: undo rename of GpuPreferences::enable_unsafe_es3_apis Created 4 years, 1 month 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 | « content/browser/gpu/compositor_util.cc ('k') | content/public/browser/gpu_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl_private.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 89da2e6a8873e0e0884ff240d37ce356b3607228..5e04178628b6db58556fad91bc71a842cfd790ff 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -179,7 +179,7 @@ void UpdateStats(const gpu::GPUInfo& gpu_info,
command_line.HasSwitch(switches::kDisableGpu),
command_line.HasSwitch(switches::kDisableGpuRasterization),
command_line.HasSwitch(switches::kDisableExperimentalWebGL),
- (!command_line.HasSwitch(switches::kEnableUnsafeES3APIs) ||
+ (!command_line.HasSwitch(switches::kEnableES3APIs) ||
command_line.HasSwitch(switches::kDisableES3APIs))};
#if defined(OS_WIN)
const std::string kGpuBlacklistFeatureHistogramNamesWin[] = {
@@ -765,8 +765,14 @@ void GpuDataManagerImplPrivate::AppendGpuCommandLine(
}
#endif
- if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL2) && gpu_preferences) {
- gpu_preferences->enable_unsafe_es3_apis = false;
+ if (gpu_preferences) { // enable_unsafe_es3_apis
+ bool blacklisted = IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL2);
+ bool enabled = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableES3APIs);
+ bool disabled = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableES3APIs);
+ gpu_preferences->enable_unsafe_es3_apis =
+ (enabled || !blacklisted) && !disabled;
}
// Pass GPU and driver information to GPU process. We try to avoid full GPU
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/public/browser/gpu_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698