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

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

Issue 2389983002: Refactored SkColorSpace and added in a Lab PCS GM (Closed)
Patch Set: responding to comments Created 4 years, 2 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 */ 59 */
60 static sk_sp<SkColorSpace> NewNamed(Named); 60 static sk_sp<SkColorSpace> NewNamed(Named);
61 61
62 /** 62 /**
63 * Create an SkColorSpace from an ICC profile. 63 * Create an SkColorSpace from an ICC profile.
64 */ 64 */
65 static sk_sp<SkColorSpace> NewICC(const void*, size_t); 65 static sk_sp<SkColorSpace> NewICC(const void*, size_t);
66 66
67 /** 67 /**
68 * Create an SkColorSpace with the same gamut as this color space, but with linear gamma. 68 * Create an SkColorSpace with the same gamut as this color space, but with linear gamma.
69 * If this is not possible due to the color space specification, nullptr is returned.
msarett 2016/10/11 13:40:30 I'm still struggling with this... Though I don't
69 */ 70 */
70 sk_sp<SkColorSpace> makeLinearGamma(); 71 sk_sp<SkColorSpace> makeLinearGamma();
71 72
72 /** 73 /**
73 * Returns true if the color space gamma is near enough to be approximated as sRGB. 74 * Returns true if the color space gamma is near enough to be approximated as sRGB.
74 */ 75 */
75 bool gammaCloseToSRGB() const; 76 bool gammaCloseToSRGB() const;
76 77
77 /** 78 /**
78 * Returns true if the color space gamma is linear. 79 * Returns true if the color space gamma is linear.
(...skipping 18 matching lines...) Expand all
97 * If both are null, we return true. If one is null and the other is not, we return false. 98 * If both are null, we return true. If one is null and the other is not, we return false.
98 * If both are non-null, we do a deeper compare. 99 * If both are non-null, we do a deeper compare.
99 */ 100 */
100 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst); 101 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst);
101 102
102 protected: 103 protected:
103 SkColorSpace() {} 104 SkColorSpace() {}
104 }; 105 };
105 106
106 #endif 107 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698