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 "SkCodec.h" | 8 #include "SkCodec.h" |
9 #include "SkColorTable.h" | 9 #include "SkColorTable.h" |
10 #include "SkImageInfo.h" | 10 #include "SkImageInfo.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 * Reads enough of the stream to determine the image format | 96 * Reads enough of the stream to determine the image format |
97 * | 97 * |
98 */ | 98 */ |
99 static SkCodec* NewFromStream(SkStream*, bool isIco); | 99 static SkCodec* NewFromStream(SkStream*, bool isIco); |
100 | 100 |
101 /* | 101 /* |
102 * | 102 * |
103 * Read enough of the stream to initialize the SkBmpCodec. Returns a bool | 103 * Read enough of the stream to initialize the SkBmpCodec. Returns a bool |
104 * representing success or failure. If it returned true, and codecOut was | 104 * representing success or failure. If it returned true, and codecOut was |
105 * not NULL, it will be set to a new SkBmpCodec. | 105 * not NULL, it will be set to a new SkBmpCodec. |
| 106 * Does *not* take ownership of the passed in SkStream. |
106 * | 107 * |
107 */ | 108 */ |
108 static bool ReadHeader(SkStream*, bool isIco, SkCodec** codecOut); | 109 static bool ReadHeader(SkStream*, bool isIco, SkCodec** codecOut); |
109 | 110 |
110 /* | 111 /* |
111 * | 112 * |
112 * Performs the bitmap decoding for bit masks input format | 113 * Performs the bitmap decoding for bit masks input format |
113 * | 114 * |
114 */ | 115 */ |
115 Result decodeMask(const SkImageInfo& dstInfo, void* dst, | 116 Result decodeMask(const SkImageInfo& dstInfo, void* dst, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 SkAutoTDelete<SkColorTable> fColorTable; // owned | 184 SkAutoTDelete<SkColorTable> fColorTable; // owned |
184 uint32_t fNumColors; | 185 uint32_t fNumColors; |
185 const uint32_t fBytesPerColor; | 186 const uint32_t fBytesPerColor; |
186 const uint32_t fOffset; | 187 const uint32_t fOffset; |
187 const RowOrder fRowOrder; | 188 const RowOrder fRowOrder; |
188 const size_t fRLEBytes; | 189 const size_t fRLEBytes; |
189 const bool fIsIco; | 190 const bool fIsIco; |
190 | 191 |
191 typedef SkCodec INHERITED; | 192 typedef SkCodec INHERITED; |
192 }; | 193 }; |
OLD | NEW |