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 20 matching lines...) Expand all Loading... |
31 static SkCodec* NewFromStream(SkStream*); | 31 static SkCodec* NewFromStream(SkStream*); |
32 | 32 |
33 /* | 33 /* |
34 * Creates a bmp decoder for a bmp embedded in ico | 34 * Creates a bmp decoder for a bmp embedded in ico |
35 * Reads enough of the stream to determine the image format | 35 * Reads enough of the stream to determine the image format |
36 */ | 36 */ |
37 static SkCodec* NewFromIco(SkStream*); | 37 static SkCodec* NewFromIco(SkStream*); |
38 | 38 |
39 protected: | 39 protected: |
40 | 40 |
41 SkBmpCodec(const SkImageInfo& info, SkStream* stream, uint16_t bitsPerPixel, | 41 SkBmpCodec(const SkEncodedInfo& info, SkStream* stream, uint16_t bitsPerPixe
l, |
42 SkCodec::SkScanlineOrder rowOrder); | 42 SkCodec::SkScanlineOrder rowOrder); |
43 | 43 |
44 SkEncodedFormat onGetEncodedFormat() const override { return kBMP_SkEncodedF
ormat; } | 44 SkEncodedFormat onGetEncodedFormat() const override { return kBMP_SkEncodedF
ormat; } |
45 | 45 |
46 /* | 46 /* |
47 * Read enough of the stream to initialize the SkBmpCodec. Returns a bool | 47 * Read enough of the stream to initialize the SkBmpCodec. Returns a bool |
48 * representing success or failure. If it returned true, and codecOut was | 48 * representing success or failure. If it returned true, and codecOut was |
49 * not nullptr, it will be set to a new SkBmpCodec. | 49 * not nullptr, it will be set to a new SkBmpCodec. |
50 * Does *not* take ownership of the passed in SkStream. | 50 * Does *not* take ownership of the passed in SkStream. |
51 */ | 51 */ |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 bool onSkipScanlines(int count) override; | 139 bool onSkipScanlines(int count) override; |
140 | 140 |
141 const uint16_t fBitsPerPixel; | 141 const uint16_t fBitsPerPixel; |
142 const SkScanlineOrder fRowOrder; | 142 const SkScanlineOrder fRowOrder; |
143 const size_t fSrcRowBytes; | 143 const size_t fSrcRowBytes; |
144 | 144 |
145 typedef SkCodec INHERITED; | 145 typedef SkCodec INHERITED; |
146 }; | 146 }; |
147 | 147 |
148 #endif | 148 #endif |
OLD | NEW |