| 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/macros.h" | 11 #include "base/macros.h" |
| 11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 12 #include "ui/gfx/gfx_export.h" | 13 #include "ui/gfx/gfx_export.h" |
| 13 | 14 |
| 14 namespace IPC { | 15 namespace IPC { |
| 15 template <class P> | 16 template <class P> |
| 16 struct ParamTraits; | 17 struct ParamTraits; |
| 17 } // namespace IPC | 18 } // namespace IPC |
| 18 | 19 |
| 19 namespace gfx { | 20 namespace gfx { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 bool operator==(const ColorSpace& other) const; | 126 bool operator==(const ColorSpace& other) const; |
| 126 bool operator!=(const ColorSpace& other) const; | 127 bool operator!=(const ColorSpace& other) const; |
| 127 bool operator<(const ColorSpace& other) const; | 128 bool operator<(const ColorSpace& other) const; |
| 128 | 129 |
| 129 private: | 130 private: |
| 130 PrimaryID primaries_; | 131 PrimaryID primaries_; |
| 131 TransferID transfer_; | 132 TransferID transfer_; |
| 132 MatrixID matrix_; | 133 MatrixID matrix_; |
| 133 RangeID range_; | 134 RangeID range_; |
| 134 | 135 |
| 136 // Only used if primaries_ == PrimaryID::CUSTOM |
| 137 float custom_primary_matrix_[12]; |
| 138 |
| 135 // This is used to look up the ICCProfile from which this ColorSpace was | 139 // This is used to look up the ICCProfile from which this ColorSpace was |
| 136 // created, if possible. | 140 // created, if possible. |
| 137 uint64_t icc_profile_id_ = 0; | 141 uint64_t icc_profile_id_ = 0; |
| 138 | 142 |
| 139 friend class ICCProfile; | 143 friend class ICCProfile; |
| 140 friend class ColorSpaceToColorSpaceTransform; | 144 friend class ColorSpaceToColorSpaceTransform; |
| 141 friend struct IPC::ParamTraits<gfx::ColorSpace>; | 145 friend struct IPC::ParamTraits<gfx::ColorSpace>; |
| 146 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); |
| 142 }; | 147 }; |
| 143 | 148 |
| 144 } // namespace gfx | 149 } // namespace gfx |
| 145 | 150 |
| 146 #endif // UI_GFX_COLOR_SPACE_H_ | 151 #endif // UI_GFX_COLOR_SPACE_H_ |
| OLD | NEW |