Index: content/common/gpu/client/context_provider_command_buffer.cc |
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc |
index eb7096499b2d23d29552e8c61b652968f97e7267..013aef4865a8e68e70c97f9dd377f9e47ec6224e 100644 |
--- a/content/common/gpu/client/context_provider_command_buffer.cc |
+++ b/content/common/gpu/client/context_provider_command_buffer.cc |
@@ -134,11 +134,14 @@ class GrContext* ContextProviderCommandBuffer::GrContext() { |
if (gr_context_) |
return gr_context_->get(); |
+ // If 3d context is lost, skip trying to make a GrContext which could fail. |
+ if (IsContextLost()) |
+ return nullptr; |
+ |
gr_context_.reset(new GrContextForWebGraphicsContext3D(context3d_.get())); |
- // If GlContext is already lost, also abandon the new GrContext. |
- if (IsContextLost()) |
- gr_context_->get()->abandonContext(); |
+ // GrContext creation should not fail with a valid context. |
piman
2015/05/12 22:06:11
I'm not sure that's true. IsContextLost() is funda
|
+ DCHECK(gr_context_->get()); |
return gr_context_->get(); |
} |