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

Unified Diff: ui/gfx/color_space.cc

Issue 2088273003: Video Color Managament (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: log color space Created 4 years, 4 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') | no next file » | 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 1b16047e519132b31c3b93094b77cb6cee33e80f..9599fe5d587ba376b64ecd8dce4338a28372016a 100644
--- a/ui/gfx/color_space.cc
+++ b/ui/gfx/color_space.cc
@@ -64,4 +64,28 @@ bool ColorSpace::operator==(const ColorSpace& other) const {
matrix_ == other.matrix_ && range_ == other.range_;
}
+bool ColorSpace::operator<(const ColorSpace& other) const {
+ if (primaries_ < other.primaries_)
+ return true;
+ if (primaries_ > other.primaries_)
+ return false;
+ if (transfer_ < other.transfer_)
+ return true;
+ if (transfer_ > other.transfer_)
+ return false;
+ if (matrix_ < other.matrix_)
+ return true;
+ if (matrix_ > other.matrix_)
+ return false;
+ if (range_ < other.range_)
+ return true;
+ if (range_ > other.range_)
+ return true;
+
+ // TODO(hubbe): For "CUSTOM" primaries or tranfer functions, compare their
+ // coefficients here
+
+ return false;
+}
+
} // namespace gfx
« no previous file with comments | « ui/gfx/color_space.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698