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

Unified Diff: src/codec/SkBmpMaskCodec.cpp

Issue 1287423002: Scanline decoding for bmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add SkScanlineOrder enum to SkScanlineDecoder.h Created 5 years, 4 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
Index: src/codec/SkBmpMaskCodec.cpp
diff --git a/src/codec/SkBmpMaskCodec.cpp b/src/codec/SkBmpMaskCodec.cpp
index 1c89ba1c84de158d80efa8725aebeef6d6b6c68c..22813e606a5beb67546f8c11fb6a8518a87c5b90 100644
--- a/src/codec/SkBmpMaskCodec.cpp
+++ b/src/codec/SkBmpMaskCodec.cpp
@@ -108,3 +108,14 @@ SkCodec::Result SkBmpMaskCodec::decode(const SkImageInfo& dstInfo,
// Finished decoding the entire image
return kSuccess;
}
+
+SkCodec::Result SkBmpMaskCodec::onStart(const SkImageInfo& dstInfo,
+ const SkCodec::Options& options, SkPMColor inputColorPtr[], int* inputColorCount) {
+ // Initialize a the mask swizzler
+ if (!this->initializeSwizzler(dstInfo)) {
+ SkCodecPrintf("Error: cannot initialize swizzler.\n");
+ return SkCodec::kInvalidConversion;
+ }
+
+ return SkCodec::kSuccess;
+}

Powered by Google App Engine
This is Rietveld 408576698