Index: content/gpu/gpu_child_thread.cc |
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc |
index 8f67d68bad63a63e5e19792160068422ef43e152..4607c6c1267176d01c5c8ecfa34b81239eaafc9f 100644 |
--- a/content/gpu/gpu_child_thread.cc |
+++ b/content/gpu/gpu_child_thread.cc |
@@ -119,6 +119,9 @@ bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) { |
} |
void GpuChildThread::OnInitialize() { |
+ // Record initialization only after collecting the GPU info because that can |
+ // take a significant amount of time. |
+ gpu_info_.initialization_time = base::Time::Now() - process_start_time_; |
Send(new GpuHostMsg_Initialized(!dead_on_arrival_, gpu_info_)); |
while (!deferred_messages_.empty()) { |
Send(deferred_messages_.front()); |
@@ -142,10 +145,6 @@ void GpuChildThread::OnInitialize() { |
if (!in_browser_process_) |
logging::SetLogMessageHandler(GpuProcessLogMessageHandler); |
- // Record initialization only after collecting the GPU info because that can |
- // take a significant amount of time. |
- gpu_info_.initialization_time = base::Time::Now() - process_start_time_; |
- |
// Defer creation of the render thread. This is to prevent it from handling |
// IPC messages before the sandbox has been enabled and all other necessary |
// initialization has succeeded. |
@@ -154,11 +153,6 @@ void GpuChildThread::OnInitialize() { |
watchdog_thread_.get(), |
ChildProcess::current()->io_message_loop_proxy(), |
ChildProcess::current()->GetShutDownEvent())); |
- |
- // Ensure the browser process receives the GPU info before a reply to any |
- // subsequent IPC it might send. |
- if (!in_browser_process_) |
- Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_)); |
} |
void GpuChildThread::StopWatchdog() { |
@@ -176,8 +170,19 @@ void GpuChildThread::OnCollectGraphicsInfo() { |
in_browser_process_); |
#endif // OS_WIN |
- if (!gpu::CollectContextGraphicsInfo(&gpu_info_)) |
- VLOG(1) << "gpu::CollectGraphicsInfo failed"; |
+ gpu::CollectInfoResult result = |
+ gpu::CollectContextGraphicsInfo(&gpu_info_); |
+ switch (result) { |
+ case gpu::kCollectInfoFatalFailure: |
+ LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal)."; |
+ // TODO(piman): can we signal overall failure? |
+ break; |
+ case gpu::kCollectInfoNonFatalFailure: |
+ VLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal)."; |
+ break; |
+ case gpu::kCollectInfoSuccess: |
+ break; |
+ } |
GetContentClient()->SetGpuInfo(gpu_info_); |
#if defined(OS_WIN) |