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 #ifndef SkCodec_wbmp_DEFINED | 8 #ifndef SkCodec_wbmp_DEFINED |
9 #define SkCodec_wbmp_DEFINED | 9 #define SkCodec_wbmp_DEFINED |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 * Takes ownership of the stream | 29 * Takes ownership of the stream |
30 */ | 30 */ |
31 static SkScanlineDecoder* NewSDFromStream(SkStream*); | 31 static SkScanlineDecoder* NewSDFromStream(SkStream*); |
32 protected: | 32 protected: |
33 SkEncodedFormat onGetEncodedFormat() const override; | 33 SkEncodedFormat onGetEncodedFormat() const override; |
34 Result onGetPixels(const SkImageInfo&, void*, size_t, | 34 Result onGetPixels(const SkImageInfo&, void*, size_t, |
35 const Options&, SkPMColor[], int*) override; | 35 const Options&, SkPMColor[], int*) override; |
36 bool onRewind() override; | 36 bool onRewind() override; |
37 private: | 37 private: |
38 /* | 38 /* |
39 * Returns a swizzler on success, NULL on failure | 39 * Returns a swizzler on success, nullptr on failure |
40 */ | 40 */ |
41 SkSwizzler* initializeSwizzler(const SkImageInfo& info, const SkPMColor* cta
ble, | 41 SkSwizzler* initializeSwizzler(const SkImageInfo& info, const SkPMColor* cta
ble, |
42 const Options& opts); | 42 const Options& opts); |
43 | 43 |
44 /* | 44 /* |
45 * Read a src row from the encoded stream | 45 * Read a src row from the encoded stream |
46 */ | 46 */ |
47 Result readRow(uint8_t* row); | 47 Result readRow(uint8_t* row); |
48 | 48 |
49 SkWbmpCodec(const SkImageInfo&, SkStream*); | 49 SkWbmpCodec(const SkImageInfo&, SkStream*); |
50 | 50 |
51 const size_t fSrcRowBytes; | 51 const size_t fSrcRowBytes; |
52 | 52 |
53 friend class SkWbmpScanlineDecoder; | 53 friend class SkWbmpScanlineDecoder; |
54 typedef SkCodec INHERITED; | 54 typedef SkCodec INHERITED; |
55 }; | 55 }; |
56 | 56 |
57 #endif // SkCodec_wbmp_DEFINED | 57 #endif // SkCodec_wbmp_DEFINED |
OLD | NEW |