| 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 "SkImageInfo.h" | 10 #include "SkImageInfo.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 /* | 117 /* |
| 118 * Initializes the swizzler. | 118 * Initializes the swizzler. |
| 119 * | 119 * |
| 120 * @param dstInfo Output image information. Dimensions may have been | 120 * @param dstInfo Output image information. Dimensions may have been |
| 121 * adjusted if the image frame size does not match the size | 121 * adjusted if the image frame size does not match the size |
| 122 * indicated in the header. | 122 * indicated in the header. |
| 123 * @param zeroInit Indicates if destination memory is zero initialized. | 123 * @param zeroInit Indicates if destination memory is zero initialized. |
| 124 */ | 124 */ |
| 125 Result initializeSwizzler(const SkImageInfo& dstInfo, ZeroInitialized zeroIn
it); | 125 Result initializeSwizzler(const SkImageInfo& dstInfo, ZeroInitialized zeroIn
it); |
| 126 | 126 |
| 127 SkSampler* getSampler() override { return fSwizzler; } |
| 128 |
| 127 /* | 129 /* |
| 128 * @return kSuccess if the read is successful and kIncompleteInput if the | 130 * @return kSuccess if the read is successful and kIncompleteInput if the |
| 129 * read fails. | 131 * read fails. |
| 130 */ | 132 */ |
| 131 Result readRow(); | 133 Result readRow(); |
| 132 | 134 |
| 133 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opts
, | 135 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opts
, |
| 134 SkPMColor inputColorPtr[], int* inputColorCount) override; | 136 SkPMColor inputColorPtr[], int* inputColorCount) override; |
| 135 | 137 |
| 136 Result onGetScanlines(void* dst, int count, size_t rowBytes) override; | 138 Result onGetScanlines(void* dst, int count, size_t rowBytes) override; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 SkAutoTDeleteArray<uint8_t> fSrcBuffer; | 170 SkAutoTDeleteArray<uint8_t> fSrcBuffer; |
| 169 SkIRect fFrameDims; | 171 SkIRect fFrameDims; |
| 170 const uint32_t fTransIndex; | 172 const uint32_t fTransIndex; |
| 171 uint32_t fFillIndex; | 173 uint32_t fFillIndex; |
| 172 bool fFrameIsSubset; | 174 bool fFrameIsSubset; |
| 173 SkAutoTDelete<SkSwizzler> fSwizzler; | 175 SkAutoTDelete<SkSwizzler> fSwizzler; |
| 174 SkAutoTUnref<SkColorTable> fColorTable; | 176 SkAutoTUnref<SkColorTable> fColorTable; |
| 175 | 177 |
| 176 typedef SkCodec INHERITED; | 178 typedef SkCodec INHERITED; |
| 177 }; | 179 }; |
| OLD | NEW |