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

Unified Diff: ui/gfx/color_space.h

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 | « no previous file | 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 c9e9038619678dba0d9eee20f06ef66a75a8e7b3..df90dabaff1d773ee594d960b5d246bd692c0487 100644
--- a/ui/gfx/color_space.h
+++ b/ui/gfx/color_space.h
@@ -150,6 +150,9 @@ class GFX_EXPORT ColorSpace {
static MatrixID MatrixIDFromInt(int matrix_id);
static ColorSpace CreateSRGB();
+ // scRGB is like RGB, but linear and values outside of 0-1 are allowed.
+ // scRGB is normally used with fp16 textures.
+ static ColorSpace CreateSCRGBLinear();
static ColorSpace CreateXYZD50();
// TODO: Remove these, and replace with more generic constructors.
@@ -161,6 +164,8 @@ class GFX_EXPORT ColorSpace {
bool operator!=(const ColorSpace& other) const;
bool operator<(const ColorSpace& other) const;
+ bool IsHDR() const;
+
// Note that this may return nullptr.
const sk_sp<SkColorSpace>& ToSkColorSpace() const { return sk_color_space_; }
static ColorSpace FromSkColorSpace(const sk_sp<SkColorSpace>& sk_color_space);
« no previous file with comments | « no previous file | ui/gfx/color_space.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698