| 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 26 matching lines...) Expand all Loading... |
| 37 SkSampler* getSampler(bool createIfNecessary) override { | 37 SkSampler* getSampler(bool createIfNecessary) override { |
| 38 SkASSERT(fSwizzler || !createIfNecessary); | 38 SkASSERT(fSwizzler || !createIfNecessary); |
| 39 return fSwizzler; | 39 return fSwizzler; |
| 40 } | 40 } |
| 41 | 41 |
| 42 /* | 42 /* |
| 43 * Read a src row from the encoded stream | 43 * Read a src row from the encoded stream |
| 44 */ | 44 */ |
| 45 bool readRow(uint8_t* row); | 45 bool readRow(uint8_t* row); |
| 46 | 46 |
| 47 SkWbmpCodec(const SkImageInfo&, SkStream*); | 47 SkWbmpCodec(int width, int height, const SkEncodedInfo&, SkStream*); |
| 48 | 48 |
| 49 const size_t fSrcRowBytes; | 49 const size_t fSrcRowBytes; |
| 50 | 50 |
| 51 // Used for scanline decodes: | 51 // Used for scanline decodes: |
| 52 SkAutoTDelete<SkSwizzler> fSwizzler; | 52 SkAutoTDelete<SkSwizzler> fSwizzler; |
| 53 SkAutoTUnref<SkColorTable> fColorTable; | 53 SkAutoTUnref<SkColorTable> fColorTable; |
| 54 SkAutoTMalloc<uint8_t> fSrcBuffer; | 54 SkAutoTMalloc<uint8_t> fSrcBuffer; |
| 55 | 55 |
| 56 int onGetScanlines(void* dst, int count, size_t dstRowBytes) override; | 56 int onGetScanlines(void* dst, int count, size_t dstRowBytes) override; |
| 57 bool onSkipScanlines(int count) override; | 57 bool onSkipScanlines(int count) override; |
| 58 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti
ons, | 58 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti
ons, |
| 59 SkPMColor inputColorTable[], int* inputColorCount) override; | 59 SkPMColor inputColorTable[], int* inputColorCount) override; |
| 60 | 60 |
| 61 typedef SkCodec INHERITED; | 61 typedef SkCodec INHERITED; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 #endif // SkCodec_wbmp_DEFINED | 64 #endif // SkCodec_wbmp_DEFINED |
| OLD | NEW |