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

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

Issue 1945693002: Create a single, unique pointer to sRGB color space (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase + Test 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
« no previous file with comments | « src/codec/SkPngCodec.cpp ('k') | src/core/SkColorSpace.cpp » ('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_DEFINED 8 #ifndef SkColorSpace_DEFINED
9 #define SkColorSpace_DEFINED 9 #define SkColorSpace_DEFINED
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 SkGammaCurve fGreen; 108 SkGammaCurve fGreen;
109 SkGammaCurve fBlue; 109 SkGammaCurve fBlue;
110 110
111 friend class SkColorSpace; 111 friend class SkColorSpace;
112 }; 112 };
113 113
114 /** 114 /**
115 * Return a colorspace instance, given a transform from linear_RGB to D50_X YZ 115 * Return a colorspace instance, given a transform from linear_RGB to D50_X YZ
116 * and the src-gamma, return a ColorSpace 116 * and the src-gamma, return a ColorSpace
117 */ 117 */
118 static sk_sp<SkColorSpace> NewRGB(const SkMatrix44& toXYZD50, SkGammas gamma s); 118 static sk_sp<SkColorSpace> NewRGB(SkGammas gammas, const SkMatrix44& toXYZD5 0);
119 119
120 static sk_sp<SkColorSpace> NewNamed(Named); 120 static sk_sp<SkColorSpace> NewNamed(Named);
121 static sk_sp<SkColorSpace> NewICC(const void*, size_t); 121 static sk_sp<SkColorSpace> NewICC(const void*, size_t);
122 122
123 const SkGammas& gammas() const { return fGammas; } 123 const SkGammas& gammas() const { return fGammas; }
124 SkMatrix44 xyz() const { return fToXYZD50; } 124 SkMatrix44 xyz() const { return fToXYZD50; }
125 Named named() const { return fNamed; } 125 Named named() const { return fNamed; }
126 uint32_t uniqueID() const { return fUniqueID; } 126 uint32_t uniqueID() const { return fUniqueID; }
127 127
128 private: 128 private:
(...skipping 15 matching lines...) Expand all
144 144
145 const SkColorLookUpTable fColorLUT; 145 const SkColorLookUpTable fColorLUT;
146 const SkGammas fGammas; 146 const SkGammas fGammas;
147 const SkMatrix44 fToXYZD50; 147 const SkMatrix44 fToXYZD50;
148 148
149 const uint32_t fUniqueID; 149 const uint32_t fUniqueID;
150 const Named fNamed; 150 const Named fNamed;
151 }; 151 };
152 152
153 #endif 153 #endif
OLDNEW
« no previous file with comments | « src/codec/SkPngCodec.cpp ('k') | src/core/SkColorSpace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698