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

Unified Diff: content/gpu/gpu_main.cc

Issue 11047011: Figure out whether we have enough information to make the final GPU blacklisting decision. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 | « content/browser/gpu/gpu_process_host.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_main.cc
===================================================================
--- content/gpu/gpu_main.cc (revision 160744)
+++ content/gpu/gpu_main.cc (working copy)
@@ -48,9 +48,6 @@
namespace {
void WarmUpSandbox(const content::GPUInfo&, bool);
-#if defined(OS_LINUX)
-void CollectGraphicsInfo(content::GPUInfo*);
-#endif
}
// Main function for starting the Gpu process.
@@ -122,19 +119,16 @@
bool initialized_gl_context = false;
// Load and initialize the GL implementation and locate the GL entry points.
if (gfx::GLSurface::InitializeOneOff()) {
-#if defined(OS_LINUX)
- // We collect full GPU info on demand in Win/Mac, i.e., when about:gpu
- // page opens. This is because we can make blacklist decisions based on
- // preliminary GPU info.
- // However, on Linux, we may not have enough info for blacklisting.
- if (!gpu_info.gpu.vendor_id || !gpu_info.gpu.device_id ||
- gpu_info.driver_vendor.empty() || gpu_info.driver_version.empty()) {
- CollectGraphicsInfo(&gpu_info);
+ if (!command_line.HasSwitch(switches::kSkipGpuFullInfoCollection)) {
+ if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info))
+ VLOG(1) << "gpu_info_collector::CollectGraphicsInfo failed";
+ content::GetContentClient()->SetGpuInfo(gpu_info);
+
// We know that CollectGraphicsInfo will initialize a GLContext.
initialized_gl_context = true;
}
-#if !defined(OS_CHROMEOS)
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA
gpu_info.driver_vendor == "NVIDIA") {
base::ThreadRestrictions::AssertIOAllowed();
@@ -145,7 +139,6 @@
}
}
#endif // OS_CHROMEOS
-#endif // OS_LINUX
} else {
VLOG(1) << "gfx::GLSurface::InitializeOneOff failed";
gpu_info.gpu_accessible = false;
@@ -313,13 +306,5 @@
#endif
}
-#if defined(OS_LINUX)
-void CollectGraphicsInfo(content::GPUInfo* gpu_info) {
- if (!gpu_info_collector::CollectGraphicsInfo(gpu_info))
- VLOG(1) << "gpu_info_collector::CollectGraphicsInfo failed";
- content::GetContentClient()->SetGpuInfo(*gpu_info);
-}
-#endif
-
} // namespace.
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698