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 | 7 |
8 #include "SkBmpCodec.h" | 8 #include "SkBmpCodec.h" |
9 #include "SkColorTable.h" | 9 #include "SkColorTable.h" |
10 #include "SkImageInfo.h" | 10 #include "SkImageInfo.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo, | 51 SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo, |
52 const SkCodec::Options& options, SkPMColor inputColorPtr[], | 52 const SkCodec::Options& options, SkPMColor inputColorPtr[], |
53 int* inputColorCount) override; | 53 int* inputColorCount) override; |
54 | 54 |
55 private: | 55 private: |
56 | 56 |
57 /* | 57 /* |
58 * Creates the color table | 58 * Creates the color table |
59 * Sets colorCount to the new color count if it is non-nullptr | 59 * Sets colorCount to the new color count if it is non-nullptr |
60 */ | 60 */ |
61 bool createColorTable(int* colorCount); | 61 bool createColorTable(SkColorType dstColorType, int* colorCount); |
62 | 62 |
63 bool initializeStreamBuffer(); | 63 bool initializeStreamBuffer(); |
64 | 64 |
65 /* | 65 /* |
66 * Before signalling kIncompleteInput, we should attempt to load the | 66 * Before signalling kIncompleteInput, we should attempt to load the |
67 * stream buffer with additional data. | 67 * stream buffer with additional data. |
68 * | 68 * |
69 * @return the number of bytes remaining in the stream buffer after | 69 * @return the number of bytes remaining in the stream buffer after |
70 * attempting to read more bytes from the stream | 70 * attempting to read more bytes from the stream |
71 */ | 71 */ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 SkAutoTDelete<SkSampler> fSampler; | 107 SkAutoTDelete<SkSampler> fSampler; |
108 | 108 |
109 // Scanline decodes allow the client to ask for a single scanline at a time. | 109 // Scanline decodes allow the client to ask for a single scanline at a time. |
110 // This can be tricky when the RLE encoding instructs the decoder to jump do
wn | 110 // This can be tricky when the RLE encoding instructs the decoder to jump do
wn |
111 // multiple lines. This field keeps track of lines that need to be skipped | 111 // multiple lines. This field keeps track of lines that need to be skipped |
112 // on subsequent calls to decodeRows(). | 112 // on subsequent calls to decodeRows(). |
113 int fLinesToSkip; | 113 int fLinesToSkip; |
114 | 114 |
115 typedef SkBmpCodec INHERITED; | 115 typedef SkBmpCodec INHERITED; |
116 }; | 116 }; |
OLD | NEW |