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

Unified Diff: src/codec/SkGifCodec.cpp

Issue 1694023002: Revert of Fix colorType/alphaType checks in SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/codec/SkGifCodec.h ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkGifCodec.cpp
diff --git a/src/codec/SkGifCodec.cpp b/src/codec/SkGifCodec.cpp
index 785c17e0f12ba7f4287d1061fc8c133db900b27b..a938f5fc48fac46ece1f929597ae5844675d3917 100644
--- a/src/codec/SkGifCodec.cpp
+++ b/src/codec/SkGifCodec.cpp
@@ -436,16 +436,19 @@
// Initialize color table and copy to the client if necessary
this->initializeColorTable(dstInfo, inputColorPtr, inputColorCount);
- this->initializeSwizzler(dstInfo, opts);
- return kSuccess;
-}
-
-void SkGifCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts) {
+ return this->initializeSwizzler(dstInfo, opts);
+}
+
+SkCodec::Result SkGifCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts) {
const SkPMColor* colorPtr = get_color_ptr(fColorTable.get());
const SkIRect* frameRect = fFrameIsSubset ? &fFrameRect : nullptr;
fSwizzler.reset(SkSwizzler::CreateSwizzler(SkSwizzler::kIndex, colorPtr, dstInfo, opts,
frameRect));
- SkASSERT(fSwizzler);
+
+ if (nullptr != fSwizzler.get()) {
+ return kSuccess;
+ }
+ return kUnimplemented;
}
bool SkGifCodec::readRow() {
« no previous file with comments | « src/codec/SkGifCodec.h ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698