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

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

Issue 988953002: gpu-raster: Check for NULL sk_surface in GpuRasterizer::RasterizeSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit test. Created 5 years, 9 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 | « cc/test/test_context_provider.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/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();
}
« no previous file with comments | « cc/test/test_context_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698