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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1118723003: Fix for texture allocation failure in 'preAbandonGpuContext' mode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 3434671d6add50f4532dcf25ba4fe0545edc01b7..3ff2f2085c600baa278c79d32032a8e636dc0031 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1733,6 +1733,9 @@ bool SkGpuDevice::filterImage(const SkImageFilter* filter, const SkBitmap& src,
// We assume here that the filter will not attempt to tile the src. Otherwise, this cache lookup
// must be pushed upstack.
AutoBitmapTexture abt(fContext, src, NULL, &texture);
+ if (!texture) {
+ return false;
+ }
return this->filterTexture(fContext, texture, src.width(), src.height(),
filter, ctx, result, offset);
« 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