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

Unified Diff: src/codec/SkBmpMaskCodec.cpp

Issue 1287423002: Scanline decoding for bmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments - Does not compile - Needs rebase for conv_poss update 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 7d1706e697f0e3b955a866e53d77ae65def773f4..4f5121321c08c784abacb910046fa50fc8434193 100644
--- a/src/codec/SkBmpMaskCodec.cpp
+++ b/src/codec/SkBmpMaskCodec.cpp
@@ -40,9 +40,10 @@ static bool conversion_possible(const SkImageInfo& dst,
* Creates an instance of the decoder
*/
SkBmpMaskCodec::SkBmpMaskCodec(const SkImageInfo& info, SkStream* stream,
+ SkBmpCodec::BmpInputFormat inputFormat,
uint16_t bitsPerPixel, SkMasks* masks,
SkBmpCodec::RowOrder rowOrder)
- : INHERITED(info, stream, bitsPerPixel, rowOrder)
+ : INHERITED(info, stream, inputFormat, bitsPerPixel, rowOrder)
, fMasks(masks)
, fMaskSwizzler(NULL)
, fSrcBuffer(NULL)
@@ -135,3 +136,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