OLD | NEW |
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 #ifndef SkBmpCodec_DEFINED | 7 #ifndef SkBmpCodec_DEFINED |
8 #define SkBmpCodec_DEFINED | 8 #define SkBmpCodec_DEFINED |
9 | 9 |
10 #include "SkCodec.h" | 10 #include "SkCodec.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 * | 74 * |
75 * @param y Iterates from 0 to height, indicating the current row. | 75 * @param y Iterates from 0 to height, indicating the current row. |
76 * @param height The height of the current subset of the image that we are | 76 * @param height The height of the current subset of the image that we are |
77 * decoding. This is generally equal to the full height | 77 * decoding. This is generally equal to the full height |
78 * when we want to decode the full or one when we are | 78 * when we want to decode the full or one when we are |
79 * sampling. | 79 * sampling. |
80 */ | 80 */ |
81 int32_t getDstRow(int32_t y, int32_t height) const; | 81 int32_t getDstRow(int32_t y, int32_t height) const; |
82 | 82 |
83 /* | 83 /* |
84 * Compute the number of colors in the color table | |
85 */ | |
86 uint32_t computeNumColors(uint32_t numColors); | |
87 | |
88 /* | |
89 * Accessors used by subclasses | 84 * Accessors used by subclasses |
90 */ | 85 */ |
91 uint16_t bitsPerPixel() const { return fBitsPerPixel; } | 86 uint16_t bitsPerPixel() const { return fBitsPerPixel; } |
92 SkScanlineOrder onGetScanlineOrder() const override { return fRowOrder; } | 87 SkScanlineOrder onGetScanlineOrder() const override { return fRowOrder; } |
93 | 88 |
94 /* | 89 /* |
95 * To be overriden by bmp subclasses, which provide unique implementations. | 90 * To be overriden by bmp subclasses, which provide unique implementations. |
96 * Performs subclass specific setup. | 91 * Performs subclass specific setup. |
97 * | 92 * |
98 * @param dstInfo Contains output information. Height specifies | 93 * @param dstInfo Contains output information. Height specifies |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 138 |
144 // TODO(msarett): Override default skipping with something more clever. | 139 // TODO(msarett): Override default skipping with something more clever. |
145 | 140 |
146 const uint16_t fBitsPerPixel; | 141 const uint16_t fBitsPerPixel; |
147 const SkScanlineOrder fRowOrder; | 142 const SkScanlineOrder fRowOrder; |
148 | 143 |
149 typedef SkCodec INHERITED; | 144 typedef SkCodec INHERITED; |
150 }; | 145 }; |
151 | 146 |
152 #endif | 147 #endif |
OLD | NEW |