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

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

Issue 1952063002: Create SkColorSpaceXform to handle color conversions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Multiply by the inverse of 255.0f Created 4 years, 7 months 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
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_DEFINED 8 #ifndef SkColorSpace_DEFINED
9 #define SkColorSpace_DEFINED 9 #define SkColorSpace_DEFINED
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 SkDEBUGCODE(float red() const { return fRed.fValue; }) 102 SkDEBUGCODE(float red() const { return fRed.fValue; })
103 SkDEBUGCODE(float green() const { return fGreen.fValue; }) 103 SkDEBUGCODE(float green() const { return fGreen.fValue; })
104 SkDEBUGCODE(float blue() const { return fBlue.fValue; }) 104 SkDEBUGCODE(float blue() const { return fBlue.fValue; })
105 105
106 private: 106 private:
107 SkGammaCurve fRed; 107 SkGammaCurve fRed;
108 SkGammaCurve fGreen; 108 SkGammaCurve fGreen;
109 SkGammaCurve fBlue; 109 SkGammaCurve fBlue;
110 110
111 friend class SkColorSpace; 111 friend class SkColorSpace;
112 friend class SkColorSpaceXform;
112 }; 113 };
113 114
114 /** 115 /**
115 * Return a colorspace instance, given a transform from linear_RGB to D50_X YZ 116 * Return a colorspace instance, given a transform from linear_RGB to D50_X YZ
116 * and the src-gamma, return a ColorSpace 117 * and the src-gamma, return a ColorSpace
117 */ 118 */
118 static sk_sp<SkColorSpace> NewRGB(SkGammas gammas, const SkMatrix44& toXYZD5 0); 119 static sk_sp<SkColorSpace> NewRGB(SkGammas gammas, const SkMatrix44& toXYZD5 0);
119 120
120 static sk_sp<SkColorSpace> NewNamed(Named); 121 static sk_sp<SkColorSpace> NewNamed(Named);
121 static sk_sp<SkColorSpace> NewICC(const void*, size_t); 122 static sk_sp<SkColorSpace> NewICC(const void*, size_t);
(...skipping 19 matching lines...) Expand all
141 142
142 SkColorSpace(SkColorLookUpTable colorLUT, SkGammas gammas, 143 SkColorSpace(SkColorLookUpTable colorLUT, SkGammas gammas,
143 const SkMatrix44& toXYZ); 144 const SkMatrix44& toXYZ);
144 145
145 const SkColorLookUpTable fColorLUT; 146 const SkColorLookUpTable fColorLUT;
146 const SkGammas fGammas; 147 const SkGammas fGammas;
147 const SkMatrix44 fToXYZD50; 148 const SkMatrix44 fToXYZD50;
148 149
149 const uint32_t fUniqueID; 150 const uint32_t fUniqueID;
150 const Named fNamed; 151 const Named fNamed;
152
153 friend class SkColorSpaceXform;
151 }; 154 };
152 155
153 #endif 156 #endif
OLDNEW
« dm/DMSrcSink.cpp ('K') | « gyp/core.gypi ('k') | src/core/SkColorSpace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698