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

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

Issue 2323003002: Cache the inverse matrix on SkColorSpace. Rename xyz() to toXYZ(). (Closed)
Patch Set: Remove xyz() again 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') | 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 static sk_sp<SkColorSpace> NewICC(const void*, size_t); 59 static sk_sp<SkColorSpace> NewICC(const void*, size_t);
60 60
61 /** 61 /**
62 * Create an SkColorSpace with the same gamut as this color space, but with linear gamma. 62 * Create an SkColorSpace with the same gamut as this color space, but with linear gamma.
63 */ 63 */
64 sk_sp<SkColorSpace> makeLinearGamma(); 64 sk_sp<SkColorSpace> makeLinearGamma();
65 65
66 /** 66 /**
67 * Returns the matrix used to transform src gamut to XYZ D50. 67 * Returns the matrix used to transform src gamut to XYZ D50.
68 */ 68 */
69 const SkMatrix44& xyz() const { return fToXYZD50; } 69 const SkMatrix44& toXYZD50() const { return fToXYZD50; }
70 70
71 /** 71 /**
72 * Returns true if the color space gamma is near enough to be approximated as sRGB. 72 * Returns true if the color space gamma is near enough to be approximated as sRGB.
73 */ 73 */
74 bool gammaCloseToSRGB() const; 74 bool gammaCloseToSRGB() const;
75 75
76 /** 76 /**
77 * Returns true if the color space gamma is linear. 77 * Returns true if the color space gamma is linear.
78 */ 78 */
79 bool gammaIsLinear() const; 79 bool gammaIsLinear() const;
(...skipping 18 matching lines...) Expand all
98 */ 98 */
99 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst); 99 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst);
100 100
101 protected: 101 protected:
102 SkColorSpace(const SkMatrix44& toXYZD50); 102 SkColorSpace(const SkMatrix44& toXYZD50);
103 103
104 const SkMatrix44 fToXYZD50; 104 const SkMatrix44 fToXYZD50;
105 }; 105 };
106 106
107 #endif 107 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkColorSpace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698