Index: content/gpu/gpu_main.cc |
=================================================================== |
--- content/gpu/gpu_main.cc (revision 122391) |
+++ content/gpu/gpu_main.cc (working copy) |
@@ -15,9 +15,11 @@ |
#include "base/win/scoped_com_initializer.h" |
#include "build/build_config.h" |
#include "content/common/gpu/gpu_config.h" |
+#include "content/public/common/content_client.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/main_function_params.h" |
#include "content/gpu/gpu_child_thread.h" |
+#include "content/gpu/gpu_info_collector.h" |
#include "content/gpu/gpu_process.h" |
#include "ui/gfx/gl/gl_surface.h" |
#include "ui/gfx/gl/gl_switches.h" |
@@ -71,10 +73,17 @@ |
// GpuMsg_Initialize message from the browser. |
bool dead_on_arrival = false; |
- // Load the GL implementation and locate the bindings before starting the GPU |
- // watchdog because this can take a lot of time and the GPU watchdog might |
- // terminate the GPU process. |
- if (!gfx::GLSurface::InitializeOneOff()) { |
+ // Load and initialize the GL implementation and locate the GL entry points. |
+ content::GPUInfo gpu_info; |
+ if (gfx::GLSurface::InitializeOneOff()) { |
+ // Collect information about the GPU. |
+ if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info)) { |
+ LOG(INFO) << "gpu_info_collector::CollectGraphicsInfo failed"; |
+ } |
+ |
+ // Set the GPU info even if it failed. |
+ content::GetContentClient()->SetGpuInfo(gpu_info); |
+ } else { |
LOG(INFO) << "gfx::GLSurface::InitializeOneOff failed"; |
dead_on_arrival = true; |
} |
@@ -114,7 +123,7 @@ |
GpuProcess gpu_process; |
- GpuChildThread* child_thread = new GpuChildThread(dead_on_arrival); |
+ GpuChildThread* child_thread = new GpuChildThread(dead_on_arrival, gpu_info); |
child_thread->Init(start_time); |