| 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 "SkColorSpaceXform.h" | 9 #include "SkColorSpaceXform.h" |
| 10 #include "SkColorTable.h" | 10 #include "SkColorTable.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 SkSampler* getSampler(bool createIfNecessary) override; | 58 SkSampler* getSampler(bool createIfNecessary) override; |
| 59 void applyXformRow(void* dst, const void* src); | 59 void applyXformRow(void* dst, const void* src); |
| 60 | 60 |
| 61 voidp png_ptr() { return fPng_ptr; } | 61 voidp png_ptr() { return fPng_ptr; } |
| 62 voidp info_ptr() { return fInfo_ptr; } | 62 voidp info_ptr() { return fInfo_ptr; } |
| 63 | 63 |
| 64 SkSwizzler* swizzler() { return fSwizzler; } | 64 SkSwizzler* swizzler() { return fSwizzler; } |
| 65 | 65 |
| 66 // Initialize variables used by applyXformRow. | 66 // Initialize variables used by applyXformRow. |
| 67 void initializeXformAlphaAndWidth(); | 67 void initializeXformParams(); |
| 68 | 68 |
| 69 /** | 69 /** |
| 70 * Pass available input to libpng to process it. | 70 * Pass available input to libpng to process it. |
| 71 * | 71 * |
| 72 * libpng will call any relevant callbacks installed. This will continue de
coding | 72 * libpng will call any relevant callbacks installed. This will continue de
coding |
| 73 * until it reaches the end of the file, or until a callback tells libpng t
o stop. | 73 * until it reaches the end of the file, or until a callback tells libpng t
o stop. |
| 74 */ | 74 */ |
| 75 void processData(); | 75 void processData(); |
| 76 | 76 |
| 77 #ifdef SK_GOOGLE3_PNG_HACK | 77 #ifdef SK_GOOGLE3_PNG_HACK |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 bool initializeXforms(const SkImageInfo& dstInfo, const Options&, SkPMColor*
colorPtr, | 121 bool initializeXforms(const SkImageInfo& dstInfo, const Options&, SkPMColor*
colorPtr, |
| 122 int* colorCount); | 122 int* colorCount); |
| 123 void initializeSwizzler(const SkImageInfo& dstInfo, const Options&); | 123 void initializeSwizzler(const SkImageInfo& dstInfo, const Options&); |
| 124 void allocateStorage(const SkImageInfo& dstInfo); | 124 void allocateStorage(const SkImageInfo& dstInfo); |
| 125 void destroyReadStruct(); | 125 void destroyReadStruct(); |
| 126 | 126 |
| 127 virtual Result decodeAllRows(void* dst, size_t rowBytes, int* rowsDecoded) =
0; | 127 virtual Result decodeAllRows(void* dst, size_t rowBytes, int* rowsDecoded) =
0; |
| 128 virtual void setRange(int firstRow, int lastRow, void* dst, size_t rowBytes)
= 0; | 128 virtual void setRange(int firstRow, int lastRow, void* dst, size_t rowBytes)
= 0; |
| 129 virtual Result decode(int* rowsDecoded) = 0; | 129 virtual Result decode(int* rowsDecoded) = 0; |
| 130 | 130 |
| 131 XformMode fXformMode; | 131 XformMode fXformMode; |
| 132 SkAlphaType fXformAlphaType; | 132 SkColorSpaceXform::ColorFormat fXformColorFormat; |
| 133 int fXformWidth; | 133 SkAlphaType fXformAlphaType; |
| 134 int fXformWidth; |
| 134 | 135 |
| 135 #ifdef SK_GOOGLE3_PNG_HACK | 136 #ifdef SK_GOOGLE3_PNG_HACK |
| 136 bool fNeedsToRereadHeader; | 137 bool fNeedsToRereadHeader; |
| 137 #endif | 138 #endif |
| 138 | 139 |
| 139 typedef SkCodec INHERITED; | 140 typedef SkCodec INHERITED; |
| 140 }; | 141 }; |
| OLD | NEW |