summaryrefslogtreecommitdiffstats
path: root/content/gpu/gpu_child_thread.cc
diff options
context:
space:
mode:
authorzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 15:51:03 +0000
committerzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 15:51:03 +0000
commitec4bda62e7a97b104ffaa858548e47e6ac157966 (patch)
tree5cc38e395b442eb58467028dd4e1a1e7629cf52e /content/gpu/gpu_child_thread.cc
parent054450391069c929bb4ff8d58088fc9e6ee006de (diff)
downloadchromium_src-ec4bda62e7a97b104ffaa858548e47e6ac157966.zip
chromium_src-ec4bda62e7a97b104ffaa858548e47e6ac157966.tar.gz
chromium_src-ec4bda62e7a97b104ffaa858548e47e6ac157966.tar.bz2
Wire gpu process startup error messages to about:gpu
This helps us to better understand why the GPU process fails to launch. BUG=249406 TEST=about:gpu get GPU process startup errors if there are any R=apatrick@chromium.org Review URL: https://codereview.chromium.org/17019002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206420 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu/gpu_child_thread.cc')
-rw-r--r--content/gpu/gpu_child_thread.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index c563999..0f012f8 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -4,11 +4,7 @@
#include "content/gpu/gpu_child_thread.h"
-#include <string>
-#include <vector>
-
#include "base/bind.h"
-#include "base/command_line.h"
#include "base/threading/worker_pool.h"
#include "build/build_config.h"
#include "content/child/child_process.h"
@@ -49,9 +45,11 @@ bool GpuProcessLogMessageHandler(int severity,
GpuChildThread::GpuChildThread(GpuWatchdogThread* watchdog_thread,
bool dead_on_arrival,
- const gpu::GPUInfo& gpu_info)
+ const gpu::GPUInfo& gpu_info,
+ const DeferredMessages& deferred_messages)
: dead_on_arrival_(dead_on_arrival),
gpu_info_(gpu_info),
+ deferred_messages_(deferred_messages),
in_browser_process_(false) {
watchdog_thread_ = watchdog_thread;
#if defined(OS_WIN)
@@ -119,6 +117,10 @@ bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) {
void GpuChildThread::OnInitialize() {
Send(new GpuHostMsg_Initialized(!dead_on_arrival_, gpu_info_));
+ while (!deferred_messages_.empty()) {
+ Send(deferred_messages_.front());
+ deferred_messages_.pop();
+ }
if (dead_on_arrival_) {
VLOG(1) << "Exiting GPU process due to errors during initialization";