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

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: 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..4da299b1b94f3527ec62ad6f4013fad73ce1b3a2 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -573,8 +573,23 @@ void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() {
gpu_driver_bugs_ = gpu_driver_bug_list_->MakeDecision(
gpu::GpuControlList::kOsAny, std::string(), gpu_info_);
- disabled_extensions_ =
- base::JoinString(gpu_driver_bug_list_->GetDisabledExtensions(), " ");
+ std::vector<std::string> disabled_vec;
+
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
+ if (command_line) {
+ disabled_vec = base::SplitString(
+ command_line->GetSwitchValueASCII(switches::kDisableGLExtensions),
+ ", ;",
+ base::KEEP_WHITESPACE,
+ base::SPLIT_WANT_NONEMPTY);
+ }
+ const std::vector<std::string>& disabled_driver_bug_exts =
+ gpu_driver_bug_list_->GetDisabledExtensions();
+ disabled_vec.insert(disabled_vec.end(),
Zhenyao Mo 2015/12/03 23:28:10 Here you may insert the same extension twice if it
David Yen 2015/12/04 00:10:53 Done.
+ disabled_driver_bug_exts.begin(),
+ disabled_driver_bug_exts.end());
+ disabled_extensions_ = base::JoinString(disabled_vec, " ");
}
gpu::GpuDriverBugList::AppendWorkaroundsFromCommandLine(
&gpu_driver_bugs_, *base::CommandLine::ForCurrentProcess());
@@ -918,7 +933,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