aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lazy/SkCachingPixelRef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lazy/SkCachingPixelRef.cpp')
-rw-r--r--src/lazy/SkCachingPixelRef.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/lazy/SkCachingPixelRef.cpp b/src/lazy/SkCachingPixelRef.cpp
index 5fc0d2a87f..3edd0de4fb 100644
--- a/src/lazy/SkCachingPixelRef.cpp
+++ b/src/lazy/SkCachingPixelRef.cpp
@@ -53,15 +53,9 @@ bool SkCachingPixelRef::onNewLockPixels(LockRec* rec) {
fErrorInDecoding = true;
return false;
}
- const SkImageGenerator::Result result = fImageGenerator->getPixels(info,
- fLockedBitmap.getPixels(), fRowBytes);
- switch (result) {
- case SkImageGenerator::kIncompleteInput:
- case SkImageGenerator::kSuccess:
- break;
- default:
- fErrorInDecoding = true;
- return false;
+ if (!fImageGenerator->getPixels(info, fLockedBitmap.getPixels(), fRowBytes)) {
+ fErrorInDecoding = true;
+ return false;
}
fLockedBitmap.setImmutable();
SkBitmapCache::Add(this, info.bounds(), fLockedBitmap);