| 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 "SkBmpCodec.h" | 8 #include "SkBmpCodec.h" |
| 9 #include "SkColorTable.h" | 9 #include "SkColorTable.h" |
| 10 #include "SkImageInfo.h" | 10 #include "SkImageInfo.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 int*) override; | 47 int*) override; |
| 48 | 48 |
| 49 bool onInIco() const override { | 49 bool onInIco() const override { |
| 50 return fInIco; | 50 return fInIco; |
| 51 } | 51 } |
| 52 | 52 |
| 53 SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo, | 53 SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo, |
| 54 const SkCodec::Options& options, SkPMColor inputColorPtr[], | 54 const SkCodec::Options& options, SkPMColor inputColorPtr[], |
| 55 int* inputColorCount) override; | 55 int* inputColorCount) override; |
| 56 | 56 |
| 57 uint32_t onGetFillValue(const SkImageInfo& dstInfo) const override; |
| 58 |
| 57 private: | 59 private: |
| 58 | 60 |
| 59 /* | 61 /* |
| 60 * Creates the color table | 62 * Creates the color table |
| 61 * Sets colorCount to the new color count if it is non-nullptr | 63 * Sets colorCount to the new color count if it is non-nullptr |
| 62 */ | 64 */ |
| 63 bool createColorTable(SkAlphaType alphaType, int* colorCount); | 65 bool createColorTable(SkAlphaType alphaType, int* colorCount); |
| 64 | 66 |
| 65 bool initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts); | 67 bool initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts); |
| 66 | 68 |
| 67 Result decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, | 69 uint32_t decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowByte
s, |
| 68 const Options& opts) override; | 70 const Options& opts) override; |
| 69 | 71 |
| 70 Result decodeIcoMask(const SkImageInfo& dstInfo, void* dst, size_t dstRowByt
es); | 72 Result decodeIcoMask(const SkImageInfo& dstInfo, void* dst, size_t dstRowByt
es); |
| 71 | 73 |
| 72 SkAutoTUnref<SkColorTable> fColorTable; // owned | 74 SkAutoTUnref<SkColorTable> fColorTable; // owned |
| 73 const uint32_t fNumColors; | 75 const uint32_t fNumColors; |
| 74 const uint32_t fBytesPerColor; | 76 const uint32_t fBytesPerColor; |
| 75 const uint32_t fOffset; | 77 const uint32_t fOffset; |
| 76 SkAutoTDelete<SkSwizzler> fSwizzler; | 78 SkAutoTDelete<SkSwizzler> fSwizzler; |
| 77 const size_t fSrcRowBytes; | 79 const size_t fSrcRowBytes; |
| 78 SkAutoTDeleteArray<uint8_t> fSrcBuffer; | 80 SkAutoTDeleteArray<uint8_t> fSrcBuffer; |
| 79 const bool fInIco; | 81 const bool fInIco; |
| 80 | 82 |
| 81 typedef SkBmpCodec INHERITED; | 83 typedef SkBmpCodec INHERITED; |
| 82 }; | 84 }; |
| OLD | NEW |