Index: src/lazy/SkCachingPixelRef.cpp |
diff --git a/src/lazy/SkCachingPixelRef.cpp b/src/lazy/SkCachingPixelRef.cpp |
index 5fc0d2a87fa7180e88ed3404c175ee0750cf2f5e..3edd0de4fb3df8125faaef69434294babed1bf17 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); |