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

Unified Diff: ui/gfx/color_space.h

Issue 2352903002: Revert of Always use valid enum values in gfx::ColorSpace (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | ui/gfx/color_space.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_space.h
diff --git a/ui/gfx/color_space.h b/ui/gfx/color_space.h
index 81919bcccf49b5f87e1a48285ce6f5e29f57b5bb..6e351899e16fe3f4523a17f571c6e873d5eb6e26 100644
--- a/ui/gfx/color_space.h
+++ b/ui/gfx/color_space.h
@@ -43,13 +43,11 @@
SMPTEST431_2 = 11,
SMPTEST432_1 = 12,
- LAST_STANDARD_VALUE = SMPTEST432_1,
-
// Chrome-specific values start at 1000.
- UNKNOWN = 1000,
- XYZ_D50,
- CUSTOM,
- LAST = UNKNOWN
+ XYZ_D50 = 1000,
+ // TODO(hubbe): We need to store the primaries.
+ CUSTOM = 1001,
+ LAST = CUSTOM
};
enum class TransferID : uint16_t {
@@ -73,11 +71,8 @@
SMPTEST2084 = 16,
SMPTEST428_1 = 17,
- LAST_STANDARD_VALUE = SMPTEST428_1,
-
// Chrome-specific values start at 1000.
- UNKNOWN = 1000,
- GAMMA24,
+ GAMMA24 = 1000,
// This is an ad-hoc transfer function that decodes SMPTE 2084 content
// into a 0-1 range more or less suitable for viewing on a non-hdr
@@ -104,11 +99,8 @@
BT2020_CL = 10,
YDZDX = 11,
- LAST_STANDARD_VALUE = YDZDX,
-
// Chrome-specific values start at 1000
- UNKNOWN = 1000,
- LAST = UNKNOWN,
+ LAST = YDZDX,
};
// The h264 spec declares this as bool, so only the the first two values
@@ -127,11 +119,6 @@
TransferID transfer,
MatrixID matrix,
RangeID full_range);
- ColorSpace(int primaries, int transfer, int matrix, RangeID full_range);
-
- static PrimaryID PrimaryIDFromInt(int primary_id);
- static TransferID TransferIDFromInt(int transfer_id);
- static MatrixID MatrixIDFromInt(int matrix_id);
static ColorSpace CreateSRGB();
static ColorSpace CreateXYZD50();
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | ui/gfx/color_space.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698