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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBmpMaskCodec.h" 8 #include "SkBmpMaskCodec.h"
9 #include "SkCodecPriv.h" 9 #include "SkCodecPriv.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 // Decode the row in destination format 102 // Decode the row in destination format
103 int row = SkBmpCodec::kBottomUp_RowOrder == this->rowOrder() ? height - 1 - y : y; 103 int row = SkBmpCodec::kBottomUp_RowOrder == this->rowOrder() ? height - 1 - y : y;
104 void* dstRow = SkTAddOffset<void>(dst, row * dstRowBytes); 104 void* dstRow = SkTAddOffset<void>(dst, row * dstRowBytes);
105 fMaskSwizzler->swizzle(dstRow, srcRow); 105 fMaskSwizzler->swizzle(dstRow, srcRow);
106 } 106 }
107 107
108 // Finished decoding the entire image 108 // Finished decoding the entire image
109 return kSuccess; 109 return kSuccess;
110 } 110 }
111
112 SkCodec::Result SkBmpMaskCodec::onStart(const SkImageInfo& dstInfo,
113 const SkCodec::Options& options, SkPMColor inputColorPtr[], int* inputCo lorCount) {
114 // Initialize a the mask swizzler
115 if (!this->initializeSwizzler(dstInfo)) {
116 SkCodecPrintf("Error: cannot initialize swizzler.\n");
117 return SkCodec::kInvalidConversion;
118 }
119
120 return SkCodec::kSuccess;
121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698