| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 BT2020_CL = 10, | 109 BT2020_CL = 10, |
| 110 YDZDX = 11, | 110 YDZDX = 11, |
| 111 | 111 |
| 112 LAST_STANDARD_VALUE = YDZDX, | 112 LAST_STANDARD_VALUE = YDZDX, |
| 113 | 113 |
| 114 // Chrome-specific values start at 1000 | 114 // Chrome-specific values start at 1000 |
| 115 UNKNOWN = 1000, | 115 UNKNOWN = 1000, |
| 116 LAST = UNKNOWN, | 116 LAST = UNKNOWN, |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 // The h264 spec declares this as bool, so only the the first two values | 119 // This corresponds to the WebM Range enum which is part of WebM color data |
| 120 // correspond to the h264 spec. Chrome-specific values can start at 2. | 120 // (see http://www.webmproject.org/docs/container/#Range). |
| 121 // We use an enum instead of a bool becuase different bit depths may have | 121 // H.264 only uses a bool, which corresponds to the LIMITED/FULL values. |
| 122 // different definitions of what "limited" means. | 122 // Chrome-specific values start at 1000. |
| 123 enum class RangeID : int8_t { | 123 enum class RangeID : int8_t { |
| 124 FULL = 0, | 124 // Range is not explicitly specified / unknown. |
| 125 UNSPECIFIED = 0, |
| 126 |
| 127 // Limited Rec. 709 color range with RGB values ranging from 16 to 235. |
| 125 LIMITED = 1, | 128 LIMITED = 1, |
| 126 | 129 |
| 127 LAST = LIMITED | 130 // Full RGB color range with RGB valees from 0 to 255. |
| 131 FULL = 2, |
| 132 |
| 133 // Range is defined by TransferID/MatrixID. |
| 134 DERIVED = 3, |
| 135 |
| 136 LAST = DERIVED |
| 128 }; | 137 }; |
| 129 | 138 |
| 130 ColorSpace(); | 139 ColorSpace(); |
| 131 ColorSpace(PrimaryID primaries, | 140 ColorSpace(PrimaryID primaries, |
| 132 TransferID transfer, | 141 TransferID transfer, |
| 133 MatrixID matrix, | 142 MatrixID matrix, |
| 134 RangeID full_range); | 143 RangeID full_range); |
| 135 ColorSpace(int primaries, int transfer, int matrix, RangeID full_range); | 144 ColorSpace(int primaries, int transfer, int matrix, RangeID full_range); |
| 136 | 145 |
| 137 static PrimaryID PrimaryIDFromInt(int primary_id); | 146 static PrimaryID PrimaryIDFromInt(int primary_id); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 168 | 177 |
| 169 friend class ICCProfile; | 178 friend class ICCProfile; |
| 170 friend class ColorSpaceToColorSpaceTransform; | 179 friend class ColorSpaceToColorSpaceTransform; |
| 171 friend struct IPC::ParamTraits<gfx::ColorSpace>; | 180 friend struct IPC::ParamTraits<gfx::ColorSpace>; |
| 172 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); | 181 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); |
| 173 }; | 182 }; |
| 174 | 183 |
| 175 } // namespace gfx | 184 } // namespace gfx |
| 176 | 185 |
| 177 #endif // UI_GFX_COLOR_SPACE_H_ | 186 #endif // UI_GFX_COLOR_SPACE_H_ |
| OLD | NEW |