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

Side by Side Diff: src/codec/SkWbmpCodec.cpp

Issue 1567863003: Rename SkGifCodec, SkIcoCodec, SkWbmpCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « src/codec/SkWbmpCodec.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "SkCodec.h" 8 #include "SkCodec.h"
9 #include "SkCodecPriv.h" 9 #include "SkCodecPriv.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
11 #include "SkColorTable.h" 11 #include "SkColorTable.h"
12 #include "SkData.h" 12 #include "SkData.h"
13 #include "SkStream.h" 13 #include "SkStream.h"
14 #include "SkCodec_wbmp.h" 14 #include "SkWbmpCodec.h"
15 15
16 // Each bit represents a pixel, so width is actually a number of bits. 16 // Each bit represents a pixel, so width is actually a number of bits.
17 // A row will always be stored in bytes, so we round width up to the 17 // A row will always be stored in bytes, so we round width up to the
18 // nearest multiple of 8 to get the number of bits actually in the row. 18 // nearest multiple of 8 to get the number of bits actually in the row.
19 // We then divide by 8 to convert to bytes. 19 // We then divide by 8 to convert to bytes.
20 static inline size_t get_src_row_bytes(int width) { 20 static inline size_t get_src_row_bytes(int width) {
21 return SkAlign8(width) >> 3; 21 return SkAlign8(width) >> 3;
22 } 22 }
23 23
24 static inline void setup_color_table(SkColorType colorType, 24 static inline void setup_color_table(SkColorType colorType,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // Initialize the swizzler 203 // Initialize the swizzler
204 fSwizzler.reset(this->initializeSwizzler(dstInfo, get_color_ptr(fColorTable. get()), options)); 204 fSwizzler.reset(this->initializeSwizzler(dstInfo, get_color_ptr(fColorTable. get()), options));
205 if (nullptr == fSwizzler.get()) { 205 if (nullptr == fSwizzler.get()) {
206 return kInvalidConversion; 206 return kInvalidConversion;
207 } 207 }
208 208
209 fSrcBuffer.reset(fSrcRowBytes); 209 fSrcBuffer.reset(fSrcRowBytes);
210 210
211 return kSuccess; 211 return kSuccess;
212 } 212 }
OLDNEW
« no previous file with comments | « src/codec/SkWbmpCodec.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698