diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/renderer/ggl/ggl.cc | 7 | ||||
-rw-r--r-- | chrome/renderer/gpu_channel_host.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/gpu_channel_host.h | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/chrome/renderer/ggl/ggl.cc b/chrome/renderer/ggl/ggl.cc index c95bbb5..8dea509 100644 --- a/chrome/renderer/ggl/ggl.cc +++ b/chrome/renderer/ggl/ggl.cc @@ -412,7 +412,12 @@ void Context::SetError(Error error) { bool Context::IsCommandBufferContextLost() { gpu::CommandBuffer::State state = command_buffer_->GetLastState(); - return state.error == gpu::error::kLostContext; + if (state.error == gpu::error::kLostContext) { + // Tell the host that the connection was lost right away. + channel_->SetStateLost(); + return true; + } + return false; } // TODO(gman): Remove This diff --git a/chrome/renderer/gpu_channel_host.cc b/chrome/renderer/gpu_channel_host.cc index ecf7bfc..719e8bf 100644 --- a/chrome/renderer/gpu_channel_host.cc +++ b/chrome/renderer/gpu_channel_host.cc @@ -37,6 +37,10 @@ const GPUInfo& GpuChannelHost::gpu_info() const { return gpu_info_; } +void GpuChannelHost::SetStateLost() { + state_ = kLost; +} + bool GpuChannelHost::OnMessageReceived(const IPC::Message& message) { DCHECK(message.routing_id() != MSG_ROUTING_CONTROL); diff --git a/chrome/renderer/gpu_channel_host.h b/chrome/renderer/gpu_channel_host.h index 42eebba..8f14841 100644 --- a/chrome/renderer/gpu_channel_host.h +++ b/chrome/renderer/gpu_channel_host.h @@ -48,6 +48,9 @@ class GpuChannelHost : public IPC::Channel::Listener, State state() const { return state_; } + // Change state to kLost. + void SetStateLost(); + // The GPU stats reported by the GPU process. void set_gpu_info(const GPUInfo& gpu_info); const GPUInfo& gpu_info() const; |