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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 size_t dstRowBytes, const Options&, SkPMColor*, | 45 size_t dstRowBytes, const Options&, SkPMColor*, |
46 int*) override; | 46 int*) override; |
47 | 47 |
48 bool onInIco() const override { | 48 bool onInIco() const override { |
49 return fInIco; | 49 return fInIco; |
50 } | 50 } |
51 private: | 51 private: |
52 | 52 |
53 /* | 53 /* |
54 * Creates the color table | 54 * Creates the color table |
55 * Sets colorCount to the new color count if it is non-NULL | 55 * Sets colorCount to the new color count if it is non-nullptr |
56 */ | 56 */ |
57 bool createColorTable(SkAlphaType alphaType, int* colorCount); | 57 bool createColorTable(SkAlphaType alphaType, int* colorCount); |
58 | 58 |
59 bool initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts); | 59 bool initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts); |
60 | 60 |
61 Result decode(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, con
st Options& opts); | 61 Result decode(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, con
st Options& opts); |
62 | 62 |
63 SkAutoTUnref<SkColorTable> fColorTable; // owned | 63 SkAutoTUnref<SkColorTable> fColorTable; // owned |
64 const uint32_t fNumColors; | 64 const uint32_t fNumColors; |
65 const uint32_t fBytesPerColor; | 65 const uint32_t fBytesPerColor; |
66 const uint32_t fOffset; | 66 const uint32_t fOffset; |
67 SkAutoTDelete<SkSwizzler> fSwizzler; | 67 SkAutoTDelete<SkSwizzler> fSwizzler; |
68 SkAutoTDeleteArray<uint8_t> fSrcBuffer; | 68 SkAutoTDeleteArray<uint8_t> fSrcBuffer; |
69 const bool fInIco; | 69 const bool fInIco; |
70 | 70 |
71 typedef SkBmpCodec INHERITED; | 71 typedef SkBmpCodec INHERITED; |
72 }; | 72 }; |
OLD | NEW |