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

Unified Diff: src/lazy/SkCachingPixelRef.cpp

Issue 1226023003: Remove SkImageGenerator pieces only for SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@severIG
Patch Set: Change the public interface without staging it. Created 5 years, 5 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 | « src/images/SkDecodingImageGenerator.cpp ('k') | src/lazy/SkDiscardablePixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/images/SkDecodingImageGenerator.cpp ('k') | src/lazy/SkDiscardablePixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698