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 198fefc7f8d0cd02780c9f86733bcd0cd03b1ad3..be93dc9d636cfd4f55ad31730cd75b369bbab35d 100644 |
--- a/content/common/gpu/client/context_provider_command_buffer.cc |
+++ b/content/common/gpu/client/context_provider_command_buffer.cc |
@@ -133,6 +133,11 @@ class GrContext* ContextProviderCommandBuffer::GrContext() { |
gr_context_.reset( |
new webkit::gpu::GrContextForWebGraphicsContext3D(context3d_.get())); |
+ |
+ // If GlContext is already lost, also abandon the new GrContext. |
+ if (gr_context_ && IsContextLost()) |
piman
2015/03/09 22:22:05
nit: no need to test for gr_contex_, it's !NULL he
vmiura
2015/03/09 22:39:01
Ok, I'll remove the check.
I think lost context s
vmiura
2015/03/09 23:10:01
Extra NULL check remove Done.
|
+ gr_context_->OnLostContext(); |
no sievers
2015/03/09 21:25:48
Can abandonContext() safely be called more than on
vmiura
2015/03/09 21:42:52
bsalomon@: Is it safe to call abandonContext() mor
vmiura
2015/03/09 23:10:01
Calling abandonContext() directly Done.
|
+ |
return gr_context_->get(); |
} |