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

Side by Side Diff: src/codec/SkCodecPriv.h

Issue 1254483004: Scanline decoding for wbmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More minor fixes 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 The Android Open Source Project 2 * Copyright 2015 The Android Open Source Project
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 #ifndef SkCodecPriv_DEFINED 8 #ifndef SkCodecPriv_DEFINED
9 #define SkCodecPriv_DEFINED 9 #define SkCodecPriv_DEFINED
10 10
(...skipping 13 matching lines...) Expand all
24 uint8_t maxAlpha = 0xFF; 24 uint8_t maxAlpha = 0xFF;
25 25
26 #define UPDATE_RESULT_ALPHA(alpha) \ 26 #define UPDATE_RESULT_ALPHA(alpha) \
27 zeroAlpha |= (alpha); \ 27 zeroAlpha |= (alpha); \
28 maxAlpha &= (alpha); 28 maxAlpha &= (alpha);
29 29
30 #define COMPUTE_RESULT_ALPHA \ 30 #define COMPUTE_RESULT_ALPHA \
31 SkSwizzler::GetResult(zeroAlpha, maxAlpha); 31 SkSwizzler::GetResult(zeroAlpha, maxAlpha);
32 32
33 /* 33 /*
34 * If there is a color table, get a pointer to the colors, otherwise return NULL
35 */
36 static const SkPMColor* get_color_ptr(SkColorTable* colorTable) {
37 return NULL != colorTable ? colorTable->readColors() : NULL;
38 }
39
40 /*
34 * 41 *
35 * Copy the codec color table back to the client when kIndex8 color type is requ ested 42 * Copy the codec color table back to the client when kIndex8 color type is requ ested
36 * 43 *
37 */ 44 */
38 static inline void copy_color_table(const SkImageInfo& dstInfo, SkColorTable* co lorTable, 45 static inline void copy_color_table(const SkImageInfo& dstInfo, SkColorTable* co lorTable,
39 SkPMColor* inputColorPtr, int* inputColorCount) { 46 SkPMColor* inputColorPtr, int* inputColorCount) {
40 if (kIndex_8_SkColorType == dstInfo.colorType()) { 47 if (kIndex_8_SkColorType == dstInfo.colorType()) {
41 SkASSERT(NULL != inputColorPtr); 48 SkASSERT(NULL != inputColorPtr);
42 SkASSERT(NULL != inputColorCount); 49 SkASSERT(NULL != inputColorCount);
43 SkASSERT(NULL != colorTable); 50 SkASSERT(NULL != colorTable);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 #endif 129 #endif
123 } 130 }
124 131
125 #ifdef SK_PRINT_CODEC_MESSAGES 132 #ifdef SK_PRINT_CODEC_MESSAGES
126 #define SkCodecPrintf SkDebugf 133 #define SkCodecPrintf SkDebugf
127 #else 134 #else
128 #define SkCodecPrintf(...) 135 #define SkCodecPrintf(...)
129 #endif 136 #endif
130 137
131 #endif // SkCodecPriv_DEFINED 138 #endif // SkCodecPriv_DEFINED
OLDNEW
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/codec/SkCodec_libpng.cpp » ('j') | src/codec/SkCodec_wbmp.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698