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 "SkEncodedFormat.h" |
10 #include "SkImageInfo.h" | 11 #include "SkImageInfo.h" |
11 #include "SkMaskSwizzler.h" | 12 #include "SkMaskSwizzler.h" |
12 #include "SkStream.h" | 13 #include "SkStream.h" |
13 #include "SkSwizzler.h" | 14 #include "SkSwizzler.h" |
14 #include "SkTypes.h" | 15 #include "SkTypes.h" |
15 | 16 |
16 // TODO: rename SkCodec_libbmp files to SkBmpCodec | 17 // TODO: rename SkCodec_libbmp files to SkBmpCodec |
17 // TODO: define a wrapper for SkDebugf that doesn't always print | 18 // TODO: define a wrapper for SkDebugf that doesn't always print |
18 /* | 19 /* |
19 * | 20 * |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 54 |
54 /* | 55 /* |
55 * | 56 * |
56 * Initiates the bitmap decode | 57 * Initiates the bitmap decode |
57 * | 58 * |
58 */ | 59 */ |
59 virtual Result onGetPixels(const SkImageInfo& dstInfo, void* dst, | 60 virtual Result onGetPixels(const SkImageInfo& dstInfo, void* dst, |
60 size_t dstRowBytes, const Options&, SkPMColor*, | 61 size_t dstRowBytes, const Options&, SkPMColor*, |
61 int*) SK_OVERRIDE; | 62 int*) SK_OVERRIDE; |
62 | 63 |
| 64 SkEncodedFormat onGetEncodedFormat() const SK_OVERRIDE { return kBMP_SkEncod
edFormat; } |
63 private: | 65 private: |
64 | 66 |
65 /* | 67 /* |
66 * | 68 * |
67 * Used to define the input format of the bitmap | 69 * Used to define the input format of the bitmap |
68 * | 70 * |
69 */ | 71 */ |
70 enum BitmapInputFormat { | 72 enum BitmapInputFormat { |
71 kStandard_BitmapInputFormat, | 73 kStandard_BitmapInputFormat, |
72 kRLE_BitmapInputFormat, | 74 kRLE_BitmapInputFormat, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 SkAutoTDelete<SkMasks> fMasks; // owned | 157 SkAutoTDelete<SkMasks> fMasks; // owned |
156 SkAutoTDelete<SkColorTable> fColorTable; // owned | 158 SkAutoTDelete<SkColorTable> fColorTable; // owned |
157 uint32_t fNumColors; | 159 uint32_t fNumColors; |
158 const uint32_t fBytesPerColor; | 160 const uint32_t fBytesPerColor; |
159 const uint32_t fOffset; | 161 const uint32_t fOffset; |
160 const RowOrder fRowOrder; | 162 const RowOrder fRowOrder; |
161 const size_t fRLEBytes; | 163 const size_t fRLEBytes; |
162 | 164 |
163 typedef SkCodec INHERITED; | 165 typedef SkCodec INHERITED; |
164 }; | 166 }; |
OLD | NEW |