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

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: Fix suggestions. 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..439e14f4fc1e49a9f57be80f56e5da5e9cec1cbd 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -11,6 +11,7 @@
#include "base/strings/stringprintf.h"
#include "cc/output/managed_memory_policy.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
+#include "third_party/skia/include/gpu/GrContext.h"
#include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h"
namespace content {
@@ -133,6 +134,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 (IsContextLost())
+ gr_context_->get()->abandonContext();
+
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