Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: src/core/SkColorSpace_A2B.h

Issue 2449243003: Initial implementation of a SkColorSpace_A2B xform (Closed)
Patch Set: fixed compile error on certain trybots related to RVO move-elision Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkColorSpaceXform_A2B.cpp ('k') | src/core/SkColorSpace_Base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/core/SkColorSpaceXform_A2B.cpp ('k') | src/core/SkColorSpace_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698