aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGpuDevice.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-04-30 08:55:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-30 08:55:06 -0700
commitf83be823e435ecabd0655547f004556f6b589876 (patch)
tree4e872a21f05d6aca3582aa3a41086841fedd1404 /src/gpu/SkGpuDevice.cpp
parentdc3088570f945ed0ede84f0af0016eedc267dda3 (diff)
Fix for texture allocation failure in 'preAbandonGpuContext' mode
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r--src/gpu/SkGpuDevice.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 3434671d6a..3ff2f2085c 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);