| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |