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

Unified Diff: cc/output/gl_renderer.cc

Issue 319723002: Gracefully handling texture creation failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 6161c51aaa7ad4f005caa51a440c0a500ed52a57..de9cfa76379bada2fb584a14a445e9197c6cb310 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -665,6 +665,8 @@ static SkBitmap ApplyImageFilter(
use_gr_context->context(), desc, GrContext::kExact_ScratchTexMatch);
skia::RefPtr<GrTexture> backing_store =
skia::AdoptRef(scratch_texture.detach());
+ if (backing_store.get() == NULL)
+ return SkBitmap();
// Create a device and canvas using that backing store.
SkGpuDevice device(use_gr_context->context(), backing_store.get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698