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

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

Issue 1497863002: Fix disabled extensions for virtual contexts and respect command line. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed GL_NUM_EXTENSIONS Created 5 years 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 | « no previous file | ui/gl/gl_gl_api_implementation.h » ('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 ec1776cd4b31b9b23bab96e8e19a17ef3d304154..c0217b82df91fe79d76a2e219f23b881786c2702 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -573,8 +573,27 @@ void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() {
gpu_driver_bugs_ = gpu_driver_bug_list_->MakeDecision(
gpu::GpuControlList::kOsAny, std::string(), gpu_info_);
+ std::set<std::string> disabled_ext_set;
+
+ // Merge disabled extensions from the command line with gpu driver bug list.
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
+ if (command_line) {
+ const std::vector<std::string>& disabled_command_line_exts =
+ base::SplitString(
+ command_line->GetSwitchValueASCII(switches::kDisableGLExtensions),
+ ", ;", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+ disabled_ext_set.insert(disabled_command_line_exts.begin(),
+ disabled_command_line_exts.end());
+ }
+ const std::vector<std::string>& disabled_driver_bug_exts =
+ gpu_driver_bug_list_->GetDisabledExtensions();
+ disabled_ext_set.insert(disabled_driver_bug_exts.begin(),
+ disabled_driver_bug_exts.end());
disabled_extensions_ =
- base::JoinString(gpu_driver_bug_list_->GetDisabledExtensions(), " ");
+ base::JoinString(std::vector<std::string>(disabled_ext_set.begin(),
+ disabled_ext_set.end()),
+ " ");
}
gpu::GpuDriverBugList::AppendWorkaroundsFromCommandLine(
&gpu_driver_bugs_, *base::CommandLine::ForCurrentProcess());
@@ -918,7 +937,6 @@ bool GpuDataManagerImplPrivate::ShouldDisableAcceleratedVideoDecode(
void GpuDataManagerImplPrivate::GetDisabledExtensions(
std::string* disabled_extensions) const {
DCHECK(disabled_extensions);
-
*disabled_extensions = disabled_extensions_;
}
« no previous file with comments | « no previous file | ui/gl/gl_gl_api_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698