| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 SkColorSpace_A2B_DEFINED | 8 #ifndef SkColorSpace_A2B_DEFINED |
| 9 #define SkColorSpace_A2B_DEFINED | 9 #define SkColorSpace_A2B_DEFINED |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 private: | 126 private: |
| 127 Type fType; | 127 Type fType; |
| 128 SkGammaNamed fGammaNamed; | 128 SkGammaNamed fGammaNamed; |
| 129 sk_sp<SkGammas> fGammas; | 129 sk_sp<SkGammas> fGammas; |
| 130 sk_sp<SkColorLookUpTable> fCLUT; | 130 sk_sp<SkColorLookUpTable> fCLUT; |
| 131 SkMatrix44 fMatrix; | 131 SkMatrix44 fMatrix; |
| 132 }; | 132 }; |
| 133 const Element& element(size_t i) const { return fElements[i]; } | 133 const Element& element(size_t i) const { return fElements[i]; } |
| 134 | 134 |
| 135 size_t count() const { return fElements.size(); } | 135 int count() const { return (int)fElements.size(); } |
| 136 | 136 |
| 137 // the intermediate profile connection space that this color space | 137 // the intermediate profile connection space that this color space |
| 138 // represents the transformation to | 138 // represents the transformation to |
| 139 enum class PCS : uint8_t { | 139 enum class PCS : uint8_t { |
| 140 kLAB, // CIELAB | 140 kLAB, // CIELAB |
| 141 kXYZ // CIEXYZ | 141 kXYZ // CIEXYZ |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 PCS pcs() const { return fPCS; } | 144 PCS pcs() const { return fPCS; } |
| 145 | 145 |
| 146 private: | 146 private: |
| 147 SkColorSpace_A2B(PCS pcs, sk_sp<SkData> profileData, std::vector<Element> el
ements); | 147 SkColorSpace_A2B(PCS pcs, sk_sp<SkData> profileData, std::vector<Element> el
ements); |
| 148 | 148 |
| 149 PCS fPCS; | 149 PCS fPCS; |
| 150 std::vector<Element> fElements; | 150 std::vector<Element> fElements; |
| 151 | 151 |
| 152 friend class SkColorSpace; | 152 friend class SkColorSpace; |
| 153 friend class ColorSpaceXformTest; |
| 153 typedef SkColorSpace_Base INHERITED; | 154 typedef SkColorSpace_Base INHERITED; |
| 154 }; | 155 }; |
| 155 | 156 |
| 156 #endif | 157 #endif |
| OLD | NEW |