Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GFX_COLOR_SPACE_H_ | 5 #ifndef UI_GFX_COLOR_SPACE_H_ |
| 6 #define UI_GFX_COLOR_SPACE_H_ | 6 #define UI_GFX_COLOR_SPACE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 bool operator==(const ColorSpace& other) const; | 137 bool operator==(const ColorSpace& other) const; |
| 138 bool operator!=(const ColorSpace& other) const; | 138 bool operator!=(const ColorSpace& other) const; |
| 139 bool operator<(const ColorSpace& other) const; | 139 bool operator<(const ColorSpace& other) const; |
| 140 | 140 |
| 141 bool IsHDR() const; | 141 bool IsHDR() const; |
| 142 | 142 |
| 143 // This will return nullptr for non-RGB spaces, spaces with non-FULL | 143 // This will return nullptr for non-RGB spaces, spaces with non-FULL |
| 144 // range, and unspecified spaces. | 144 // range, and unspecified spaces. |
| 145 sk_sp<SkColorSpace> ToSkColorSpace() const; | 145 sk_sp<SkColorSpace> ToSkColorSpace() const; |
| 146 | 146 |
| 147 // Return an SkColorSpace that represents this color space, with output-space | |
| 148 // blending (which is only linear for color spaces with a linear tranasfer | |
| 149 // function. | |
|
enne (OOO)
2017/03/02 01:40:08
missing parenthesis here
ccameron
2017/03/03 00:36:04
Done.
| |
| 150 sk_sp<SkColorSpace> ToNonlinearBlendedSkColorSpace() const; | |
| 151 | |
| 147 // Populate |icc_profile| with an ICC profile that represents this color | 152 // Populate |icc_profile| with an ICC profile that represents this color |
| 148 // space. Returns false if this space is not representable. This ICC profile | 153 // space. Returns false if this space is not representable. This ICC profile |
| 149 // will be constructed ignoring the range adjust and transfer matrices (this | 154 // will be constructed ignoring the range adjust and transfer matrices (this |
| 150 // is to match the IOSurface interface which takes the ICC profile and range | 155 // is to match the IOSurface interface which takes the ICC profile and range |
| 151 // and transfer matrices separately). | 156 // and transfer matrices separately). |
| 152 bool GetICCProfile(ICCProfile* icc_profile) const; | 157 bool GetICCProfile(ICCProfile* icc_profile) const; |
| 153 | 158 |
| 154 void GetPrimaryMatrix(SkMatrix44* to_XYZD50) const; | 159 void GetPrimaryMatrix(SkMatrix44* to_XYZD50) const; |
| 155 bool GetTransferFunction(SkColorSpaceTransferFn* fn) const; | 160 bool GetTransferFunction(SkColorSpaceTransferFn* fn) const; |
| 156 bool GetInverseTransferFunction(SkColorSpaceTransferFn* fn) const; | 161 bool GetInverseTransferFunction(SkColorSpaceTransferFn* fn) const; |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 182 friend class ColorTransform; | 187 friend class ColorTransform; |
| 183 friend class ColorTransformInternal; | 188 friend class ColorTransformInternal; |
| 184 friend class ColorSpaceWin; | 189 friend class ColorSpaceWin; |
| 185 friend struct IPC::ParamTraits<gfx::ColorSpace>; | 190 friend struct IPC::ParamTraits<gfx::ColorSpace>; |
| 186 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); | 191 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); |
| 187 }; | 192 }; |
| 188 | 193 |
| 189 } // namespace gfx | 194 } // namespace gfx |
| 190 | 195 |
| 191 #endif // UI_GFX_COLOR_SPACE_H_ | 196 #endif // UI_GFX_COLOR_SPACE_H_ |
| OLD | NEW |