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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 bool GetInverseTransferFunction(SkColorSpaceTransferFn* fn) const; | 183 bool GetInverseTransferFunction(SkColorSpaceTransferFn* fn) const; |
| 184 | 184 |
| 185 // For most formats, this is the RGB to YUV matrix. | 185 // For most formats, this is the RGB to YUV matrix. |
| 186 void GetTransferMatrix(SkMatrix44* matrix) const; | 186 void GetTransferMatrix(SkMatrix44* matrix) const; |
| 187 void GetRangeAdjustMatrix(SkMatrix44* matrix) const; | 187 void GetRangeAdjustMatrix(SkMatrix44* matrix) const; |
| 188 | 188 |
| 189 private: | 189 private: |
| 190 PrimaryID primaries_ = PrimaryID::UNSPECIFIED; | 190 PrimaryID primaries_ = PrimaryID::UNSPECIFIED; |
| 191 TransferID transfer_ = TransferID::UNSPECIFIED; | 191 TransferID transfer_ = TransferID::UNSPECIFIED; |
| 192 MatrixID matrix_ = MatrixID::UNSPECIFIED; | 192 MatrixID matrix_ = MatrixID::UNSPECIFIED; |
| 193 RangeID range_ = RangeID::LIMITED; | 193 RangeID range_ = RangeID::FULL; |
|
hubbe
2017/02/15 08:48:56
Maybe we should have an unspecified range?
I'm not
ccameron
2017/02/15 09:34:28
Not sure what to do here. The default gfx::ColorSp
| |
| 194 | 194 |
| 195 // Only used if primaries_ is PrimaryID::CUSTOM. | 195 // Only used if primaries_ is PrimaryID::CUSTOM. |
| 196 float custom_primary_matrix_[9] = {0, 0, 0, 0, 0, 0, 0, 0}; | 196 float custom_primary_matrix_[9] = {0, 0, 0, 0, 0, 0, 0, 0}; |
| 197 | 197 |
| 198 // Only used if transfer_ is TransferID::CUSTOM. This array consists of the A | 198 // Only used if transfer_ is TransferID::CUSTOM. This array consists of the A |
| 199 // through G entries of the SkColorSpaceTransferFn structure in alphabetical | 199 // through G entries of the SkColorSpaceTransferFn structure in alphabetical |
| 200 // order. | 200 // order. |
| 201 float custom_transfer_params_[7] = {0, 0, 0, 0, 0, 0, 0}; | 201 float custom_transfer_params_[7] = {0, 0, 0, 0, 0, 0, 0}; |
| 202 | 202 |
| 203 // This is used to look up the ICCProfile from which this ColorSpace was | 203 // This is used to look up the ICCProfile from which this ColorSpace was |
| 204 // created, if possible. | 204 // created, if possible. |
| 205 uint64_t icc_profile_id_ = 0; | 205 uint64_t icc_profile_id_ = 0; |
| 206 sk_sp<SkColorSpace> icc_profile_sk_color_space_; | 206 sk_sp<SkColorSpace> icc_profile_sk_color_space_; |
| 207 | 207 |
| 208 friend class ICCProfile; | 208 friend class ICCProfile; |
| 209 friend class ColorTransform; | 209 friend class ColorTransform; |
| 210 friend class ColorTransformInternal; | 210 friend class ColorTransformInternal; |
| 211 friend class ColorSpaceWin; | 211 friend class ColorSpaceWin; |
| 212 friend struct IPC::ParamTraits<gfx::ColorSpace>; | 212 friend struct IPC::ParamTraits<gfx::ColorSpace>; |
| 213 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); | 213 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); |
| 214 }; | 214 }; |
| 215 | 215 |
| 216 } // namespace gfx | 216 } // namespace gfx |
| 217 | 217 |
| 218 #endif // UI_GFX_COLOR_SPACE_H_ | 218 #endif // UI_GFX_COLOR_SPACE_H_ |
| OLD | NEW |