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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // TODO: Remove these, and replace with more generic constructors. | 126 // TODO: Remove these, and replace with more generic constructors. |
127 static ColorSpace CreateJpeg(); | 127 static ColorSpace CreateJpeg(); |
128 static ColorSpace CreateREC601(); | 128 static ColorSpace CreateREC601(); |
129 static ColorSpace CreateREC709(); | 129 static ColorSpace CreateREC709(); |
130 | 130 |
131 bool operator==(const ColorSpace& other) const; | 131 bool operator==(const ColorSpace& other) const; |
132 bool operator!=(const ColorSpace& other) const; | 132 bool operator!=(const ColorSpace& other) const; |
133 bool operator<(const ColorSpace& other) const; | 133 bool operator<(const ColorSpace& other) const; |
134 | 134 |
135 private: | 135 private: |
136 PrimaryID primaries_; | 136 PrimaryID primaries_ = PrimaryID::UNSPECIFIED; |
137 TransferID transfer_; | 137 TransferID transfer_ = TransferID::UNSPECIFIED; |
138 MatrixID matrix_; | 138 MatrixID matrix_ = MatrixID::UNSPECIFIED; |
139 RangeID range_; | 139 RangeID range_ = RangeID::LIMITED; |
140 | 140 |
141 // Only used if primaries_ == PrimaryID::CUSTOM | 141 // Only used if primaries_ == PrimaryID::CUSTOM |
142 float custom_primary_matrix_[12]; | 142 float custom_primary_matrix_[12]; |
143 | 143 |
144 // This is used to look up the ICCProfile from which this ColorSpace was | 144 // This is used to look up the ICCProfile from which this ColorSpace was |
145 // created, if possible. | 145 // created, if possible. |
146 uint64_t icc_profile_id_ = 0; | 146 uint64_t icc_profile_id_ = 0; |
147 | 147 |
148 friend class ICCProfile; | 148 friend class ICCProfile; |
149 friend class ColorSpaceToColorSpaceTransform; | 149 friend class ColorSpaceToColorSpaceTransform; |
150 friend struct IPC::ParamTraits<gfx::ColorSpace>; | 150 friend struct IPC::ParamTraits<gfx::ColorSpace>; |
151 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); | 151 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); |
152 }; | 152 }; |
153 | 153 |
154 } // namespace gfx | 154 } // namespace gfx |
155 | 155 |
156 #endif // UI_GFX_COLOR_SPACE_H_ | 156 #endif // UI_GFX_COLOR_SPACE_H_ |
OLD | NEW |