diff options
author | sugoi@chromium.org <sugoi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-06 00:44:52 +0000 |
---|---|---|
committer | sugoi@chromium.org <sugoi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-06 00:44:52 +0000 |
commit | 4f5488b69e791f8df26fcf2b74f5378fa416a06f (patch) | |
tree | 33107ad181301e7d69b6f06a91c8ab244b40e925 /cc/output/gl_renderer.cc | |
parent | ec4438b23564e7ec194b08acb31935a48a8413e8 (diff) | |
download | chromium_src-4f5488b69e791f8df26fcf2b74f5378fa416a06f.zip chromium_src-4f5488b69e791f8df26fcf2b74f5378fa416a06f.tar.gz chromium_src-4f5488b69e791f8df26fcf2b74f5378fa416a06f.tar.bz2 |
Gracefully handling texture creation failure
For many reasons, something can go wrong within GrGpuGL::onCreateTexture() and fail to create the backing store's texture. Instead of crashing, we can handle this gracefully and simply render the page without the filter(s) applied.
BUG=380407
Review URL: https://codereview.chromium.org/319723002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275285 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/gl_renderer.cc')
-rw-r--r-- | cc/output/gl_renderer.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc index 6161c51a..de9cfa7 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()); |