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

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

Issue 2270103002: New helper for creating a color space from another, with linear gamma (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 3 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 | « no previous file | src/core/SkColorSpace.cpp » ('j') | src/core/SkColorSpace.cpp » ('J')
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 /** 60 /**
61 * Create a common, named SkColorSpace. 61 * Create a common, named SkColorSpace.
62 */ 62 */
63 static sk_sp<SkColorSpace> NewNamed(Named); 63 static sk_sp<SkColorSpace> NewNamed(Named);
64 64
65 /** 65 /**
66 * Create an SkColorSpace from an ICC profile. 66 * Create an SkColorSpace from an ICC profile.
67 */ 67 */
68 static sk_sp<SkColorSpace> NewICC(const void*, size_t); 68 static sk_sp<SkColorSpace> NewICC(const void*, size_t);
69 69
70 /**
71 * Create an SkColorSpace with the same gamut as this color space, but with linear gamma.
72 */
73 sk_sp<SkColorSpace> makeLinearGamma();
74
70 GammaNamed gammaNamed() const { return fGammaNamed; } 75 GammaNamed gammaNamed() const { return fGammaNamed; }
71 76
72 /** 77 /**
73 * Returns the matrix used to transform src gamut to XYZ D50. 78 * Returns the matrix used to transform src gamut to XYZ D50.
74 */ 79 */
75 const SkMatrix44& xyz() const { return fToXYZD50; } 80 const SkMatrix44& xyz() const { return fToXYZD50; }
76 81
77 /** 82 /**
78 * Returns true if the color space gamma is near enough to be approximated as sRGB. 83 * Returns true if the color space gamma is near enough to be approximated as sRGB.
79 */ 84 */
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 117
113 protected: 118 protected:
114 SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named) ; 119 SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named) ;
115 120
116 const GammaNamed fGammaNamed; 121 const GammaNamed fGammaNamed;
117 const SkMatrix44 fToXYZD50; 122 const SkMatrix44 fToXYZD50;
118 const Named fNamed; 123 const Named fNamed;
119 }; 124 };
120 125
121 #endif 126 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkColorSpace.cpp » ('j') | src/core/SkColorSpace.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698