diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-09 01:50:08 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-09 01:50:08 +0000 |
commit | e09cee46b136f877390960323c84ef935ce5b7df (patch) | |
tree | dd1429752417d269b5b252bb3baea676e427cb05 /chrome/renderer/gpu_channel_host.cc | |
parent | 04b7a5a3bcfe08aa22c33e341184dfbbd3c00646 (diff) | |
download | chromium_src-e09cee46b136f877390960323c84ef935ce5b7df.zip chromium_src-e09cee46b136f877390960323c84ef935ce5b7df.tar.gz chromium_src-e09cee46b136f877390960323c84ef935ce5b7df.tar.bz2 |
- Relanding 61718.
I disabled the GPU watchdog in three new cases:
- If the OSMesa software renderer is in use. This will disable it on bots.
- When running on valgrind, whether on a bot or locally.
- In debug builds
I added a GPU process initialization time to the GPU info.
I moved the GPU initialization code outside the watchdog protection because it
can take a long time and trigger the watchdog.
I increased the timeout. I set up a field trial with different timeouts to see
the rate of failure for each period.
Original CL description:
I added a watchdog thread that intermitently checks the main thread can respond
to tasks posted on its message queue.
I fixed some bugs that prevented GGL from failing when the GPU channel was
lost.
Added a command line swith to disable the watchdog thread for debugging
purposes.
TEST=try, local testing of all features
BUG=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65461 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/gpu_channel_host.cc')
-rw-r--r-- | chrome/renderer/gpu_channel_host.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/renderer/gpu_channel_host.cc b/chrome/renderer/gpu_channel_host.cc index e2e14be..6ce8d7d 100644 --- a/chrome/renderer/gpu_channel_host.cc +++ b/chrome/renderer/gpu_channel_host.cc @@ -10,7 +10,7 @@ #include "chrome/renderer/command_buffer_proxy.h" #include "chrome/renderer/gpu_video_service_host.h" -GpuChannelHost::GpuChannelHost() : state_(UNCONNECTED) { +GpuChannelHost::GpuChannelHost() : state_(kUnconnected) { } GpuChannelHost::~GpuChannelHost() { @@ -26,7 +26,7 @@ void GpuChannelHost::Connect(const std::string& channel_name) { // It is safe to send IPC messages before the channel completes the connection // and receives the hello message from the GPU process. The messages get // cached. - state_ = CONNECTED; + state_ = kConnected; } void GpuChannelHost::set_gpu_info(const GPUInfo& gpu_info) { @@ -55,7 +55,7 @@ void GpuChannelHost::OnChannelConnected(int32 peer_pid) { } void GpuChannelHost::OnChannelError() { - state_ = LOST; + state_ = kLost; // Channel is invalid and will be reinitialized if this host is requested // again. @@ -76,12 +76,13 @@ void GpuChannelHost::OnChannelError() { } bool GpuChannelHost::Send(IPC::Message* message) { - if (!channel_.get()) { - delete message; - return false; - } + if (channel_.get()) + return channel_->Send(message); - return channel_->Send(message); + // Callee takes ownership of message, regardless of whether Send is + // successful. See IPC::Message::Sender. + delete message; + return false; } CommandBufferProxy* GpuChannelHost::CreateViewCommandBuffer( |