Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 277113002: Fixed flakiness of context_lost tests on GPU bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed more review feedback from creis. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/gpu_channel_host.cc
diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc
index afc0b5993c7e548060235b95bf1b865bf92bbe66..f503051fb162ee42d3f8ab442de42edc47265fdb 100644
--- a/content/common/gpu/client/gpu_channel_host.cc
+++ b/content/common/gpu/client/gpu_channel_host.cc
@@ -144,6 +144,19 @@ CommandBufferProxyImpl* GpuChannelHost::CreateViewCommandBuffer(
int32 route_id = GenerateRouteID();
if (!factory_->CreateViewCommandBuffer(surface_id, init_params, route_id)) {
LOG(ERROR) << "GpuChannelHost::CreateViewCommandBuffer failed.";
+
+ // The most likely reason CreateViewCommandBuffer will fail is
+ // that the GPU process crashed. In this case the GPU channel
+ // needs to be considered lost. The caller will then set up a new
+ // connection, and the GPU channel and any view command buffers
+ // will all be associated with the same GPU process.
+ DCHECK(MessageLoopProxy::current().get());
+
+ scoped_refptr<base::MessageLoopProxy> io_loop = factory_->GetIOLoopProxy();
+ io_loop->PostTask(FROM_HERE,
+ base::Bind(&GpuChannelHost::MessageFilter::OnChannelError,
+ channel_filter_.get()));
+
return NULL;
}
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698