Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: ui/gfx/color_space.h

Issue 2742613002: color: Always use parametric color spaces for raster (Closed)
Patch Set: Incorporate review feedback Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/gfx/color_space.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <ostream> 9 #include <ostream>
10 10
(...skipping 24 matching lines...) Expand all
35 BT470BG, 35 BT470BG,
36 SMPTE170M, 36 SMPTE170M,
37 SMPTE240M, 37 SMPTE240M,
38 FILM, 38 FILM,
39 BT2020, 39 BT2020,
40 SMPTEST428_1, 40 SMPTEST428_1,
41 SMPTEST431_2, 41 SMPTEST431_2,
42 SMPTEST432_1, 42 SMPTEST432_1,
43 XYZ_D50, 43 XYZ_D50,
44 ADOBE_RGB, 44 ADOBE_RGB,
45 // Primaries defined by the primary matrix |custom_primary_matrix_|.
45 CUSTOM, 46 CUSTOM,
46 LAST = CUSTOM 47 // For color spaces defined by an ICC profile which cannot be represented
48 // parametrically. Any ColorTransform using this color space will use the
49 // ICC profile directly to compute a transform LUT.
50 ICC_BASED,
51 LAST = ICC_BASED,
47 }; 52 };
48 53
49 enum class TransferID : uint16_t { 54 enum class TransferID : uint16_t {
50 INVALID, 55 INVALID,
51 BT709, 56 BT709,
52 GAMMA22, 57 GAMMA22,
53 GAMMA24, 58 GAMMA24,
54 GAMMA28, 59 GAMMA28,
55 SMPTE170M, 60 SMPTE170M,
56 SMPTE240M, 61 SMPTE240M,
(...skipping 10 matching lines...) Expand all
67 ARIB_STD_B67, // AKA hybrid-log gamma, HLG. 72 ARIB_STD_B67, // AKA hybrid-log gamma, HLG.
68 // This is an ad-hoc transfer function that decodes SMPTE 2084 content 73 // This is an ad-hoc transfer function that decodes SMPTE 2084 content
69 // into a [0, 1] range more or less suitable for viewing on a non-hdr 74 // into a [0, 1] range more or less suitable for viewing on a non-hdr
70 // display. 75 // display.
71 SMPTEST2084_NON_HDR, 76 SMPTEST2084_NON_HDR,
72 // The same as IEC61966_2_1 on the interval [0, 1], with the nonlinear 77 // The same as IEC61966_2_1 on the interval [0, 1], with the nonlinear
73 // segment continuing beyond 1 and point symmetry defining values below 0. 78 // segment continuing beyond 1 and point symmetry defining values below 0.
74 IEC61966_2_1_HDR, 79 IEC61966_2_1_HDR,
75 // The same as LINEAR but is defined for all real values. 80 // The same as LINEAR but is defined for all real values.
76 LINEAR_HDR, 81 LINEAR_HDR,
82 // A parametric transfer function defined by |custom_transfer_params_|.
77 CUSTOM, 83 CUSTOM,
78 LAST = CUSTOM, 84 // See PrimaryID::ICC_BASED.
85 ICC_BASED,
86 LAST = ICC_BASED,
79 }; 87 };
80 88
81 enum class MatrixID : int16_t { 89 enum class MatrixID : int16_t {
82 INVALID, 90 INVALID,
83 RGB, 91 RGB,
84 BT709, 92 BT709,
85 FCC, 93 FCC,
86 BT470BG, 94 BT470BG,
87 SMPTE170M, 95 SMPTE170M,
88 SMPTE240M, 96 SMPTE240M,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); 213 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
206 }; 214 };
207 215
208 // Stream operator so ColorSpace can be used in assertion statements. 216 // Stream operator so ColorSpace can be used in assertion statements.
209 GFX_EXPORT std::ostream& operator<<(std::ostream& out, 217 GFX_EXPORT std::ostream& operator<<(std::ostream& out,
210 const ColorSpace& color_space); 218 const ColorSpace& color_space);
211 219
212 } // namespace gfx 220 } // namespace gfx
213 221
214 #endif // UI_GFX_COLOR_SPACE_H_ 222 #endif // UI_GFX_COLOR_SPACE_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/gfx/color_space.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698