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

Unified Diff: content/gpu/gpu_main.cc

Issue 10310180: Disable GPU info collection on GPU process startup on Win/Mac. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« content/gpu/gpu_child_thread.cc ('K') | « content/gpu/gpu_child_thread.cc ('k') | no next file » | 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 137174)
+++ content/gpu/gpu_main.cc (working copy)
@@ -19,7 +19,6 @@
#include "content/gpu/gpu_child_thread.h"
#include "content/gpu/gpu_info_collector.h"
#include "content/gpu/gpu_process.h"
-#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "crypto/hmac.h"
@@ -61,45 +60,6 @@
#endif
}
- // Initialization of the OpenGL bindings may fail, in which case we
- // will need to tear down this process. However, we can not do so
- // safely until the IPC channel is set up, because the detection of
- // early return of a child process is implemented using an IPC
- // channel error. If the IPC channel is not fully set up between the
- // browser and GPU process, and the GPU process crashes or exits
- // early, the browser process will never detect it. For this reason
- // we defer tearing down the GPU process until receiving the
- // GpuMsg_Initialize message from the browser.
- bool dead_on_arrival = false;
-
- // Load and initialize the GL implementation and locate the GL entry points.
- content::GPUInfo gpu_info;
- if (gfx::GLSurface::InitializeOneOff()) {
apatrick_chromium 2012/05/16 18:02:35 See remarkes for gpu_child_thread.cc first. I thin
- // Collect information about the GPU.
- if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info)) {
- LOG(INFO) << "gpu_info_collector::CollectGraphicsInfo failed";
- }
-
-#if defined(OS_LINUX)
- if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA
- gpu_info.driver_vendor == "NVIDIA") {
- base::ThreadRestrictions::AssertIOAllowed();
- if (access("/dev/nvidiactl", R_OK) != 0) {
- LOG(INFO) << "NVIDIA device file /dev/nvidiactl access denied";
- gpu_info.gpu_accessible = false;
- dead_on_arrival = true;
- }
- }
-#endif
-
- // Set the GPU info even if it failed.
- content::GetContentClient()->SetGpuInfo(gpu_info);
- } else {
- LOG(INFO) << "gfx::GLSurface::InitializeOneOff failed";
- gpu_info.gpu_accessible = false;
- dead_on_arrival = true;
- }
-
// Warm up the random subsystem, which needs to be done pre-sandbox on all
// platforms.
(void) base::RandUint64();
@@ -152,7 +112,7 @@
GpuProcess gpu_process;
- GpuChildThread* child_thread = new GpuChildThread(dead_on_arrival, gpu_info);
+ GpuChildThread* child_thread = new GpuChildThread;
child_thread->Init(start_time);
« content/gpu/gpu_child_thread.cc ('K') | « content/gpu/gpu_child_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698