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

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

Issue 2087283003: Fixed running gpu process with kOverrideUseGLWithOSMesaForTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set kOverrideUseGLForTests higher priority than kUseGL. Created 4 years, 6 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
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 bff0dcbb7945b35f97a0752080a5f8123fa6c447..bd9e61b6a34a61d32a08cf5d801d7561456552be 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -527,8 +527,11 @@ void GpuDataManagerImplPrivate::Initialize() {
}
gpu::GPUInfo gpu_info;
- if (command_line->GetSwitchValueASCII(switches::kUseGL) ==
- gl::kGLImplementationOSMesaName) {
+ const bool force_osmesa =
+ (command_line->GetSwitchValueASCII(switches::kUseGL) ==
+ gl::kGLImplementationOSMesaName) ||
+ command_line->HasSwitch(switches::kOverrideUseGLWithOSMesaForTests);
+ if (force_osmesa) {
// If using the OSMesa GL implementation, use fake vendor and device ids to
// make sure it never gets blacklisted. This is better than simply
// cancelling GPUInfo gathering as it allows us to proceed with loading the
@@ -540,6 +543,10 @@ void GpuDataManagerImplPrivate::Initialize() {
// Also declare the driver_vendor to be osmesa to be able to specify
// exceptions based on driver_vendor==osmesa for some blacklist rules.
gpu_info.driver_vendor = gl::kGLImplementationOSMesaName;
+
+ // We are not going to call CollectBasicGraphicsInfo.
+ // So mark it as collected.
+ gpu_info.basic_info_state = gpu::kCollectInfoSuccess;
} else {
TRACE_EVENT0("startup",
"GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo");

Powered by Google App Engine
This is Rietveld 408576698