Index: src/lazy/SkCachingPixelRef.cpp |
diff --git a/src/lazy/SkCachingPixelRef.cpp b/src/lazy/SkCachingPixelRef.cpp |
index 5ab96562ec8184f9adb1671ea36ec1db54e31829..570fc6fbd78a5d75edc69d56a6bb85a673e4c375 100644 |
--- a/src/lazy/SkCachingPixelRef.cpp |
+++ b/src/lazy/SkCachingPixelRef.cpp |
@@ -52,9 +52,15 @@ bool SkCachingPixelRef::onNewLockPixels(LockRec* rec) { |
fErrorInDecoding = true; |
return false; |
} |
- if (!fImageGenerator->getPixels(info, fLockedBitmap.getPixels(), fRowBytes)) { |
- 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; |
} |
fLockedBitmap.setImmutable(); |
SkBitmapCache::Add( |