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

Unified Diff: ui/gfx/color_space.cc

Issue 2640393002: HDR preparations (Closed)
Patch Set: scRGB -> scRGBLinear Created 3 years, 11 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 | « ui/gfx/color_space.h ('k') | ui/gfx/color_transform.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_space.cc
diff --git a/ui/gfx/color_space.cc b/ui/gfx/color_space.cc
index 8d3b4c19608ae85bba16f7a229102f41137a9b9c..2bf317bcecb7ec8db177ad8da6c18507680c4e6a 100644
--- a/ui/gfx/color_space.cc
+++ b/ui/gfx/color_space.cc
@@ -86,6 +86,12 @@ ColorSpace ColorSpace::CreateSRGB() {
return result;
}
+// static
+ColorSpace ColorSpace::CreateSCRGBLinear() {
+ return ColorSpace(PrimaryID::BT709, TransferID::LINEAR, MatrixID::RGB,
+ RangeID::FULL);
+}
+
// Static
ColorSpace ColorSpace::CreateXYZD50() {
return ColorSpace(PrimaryID::XYZ_D50, TransferID::LINEAR, MatrixID::RGB,
@@ -121,6 +127,11 @@ bool ColorSpace::operator==(const ColorSpace& other) const {
return true;
}
+bool ColorSpace::IsHDR() const {
+ return transfer_ == TransferID::SMPTEST2084 ||
+ transfer_ == TransferID::ARIB_STD_B67;
+}
+
bool ColorSpace::operator!=(const ColorSpace& other) const {
return !(*this == other);
}
« no previous file with comments | « ui/gfx/color_space.h ('k') | ui/gfx/color_transform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698