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

Unified Diff: third_party/WebKit/Source/platform/graphics/ColorSpace.h

Issue 2652313004: Implement color-gamut media query (Closed)
Patch Set: fix windows build 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
Index: third_party/WebKit/Source/platform/graphics/ColorSpace.h
diff --git a/third_party/WebKit/Source/platform/graphics/ColorSpace.h b/third_party/WebKit/Source/platform/graphics/ColorSpace.h
index 43570f17570f26dd847d41c914eeb19fac259a22..9672626345748a65fc934a59436c1c5f63c581ab 100644
--- a/third_party/WebKit/Source/platform/graphics/ColorSpace.h
+++ b/third_party/WebKit/Source/platform/graphics/ColorSpace.h
@@ -31,11 +31,30 @@
#include "third_party/skia/include/core/SkRefCnt.h"
class SkColorFilter;
+class SkColorSpace;
namespace blink {
+struct WebScreenInfo;
+
enum ColorSpace { ColorSpaceDeviceRGB, ColorSpaceSRGB, ColorSpaceLinearRGB };
+enum class ColorSpaceGamut {
+ // Values synced with 'Gamut' in src/tools/metrics/histograms/histograms.xml
+ Unknown = 0,
+ LessThanNTSC = 1,
+ NTSC = 2,
+ SRGB = 3,
+ AlmostP3 = 4,
+ P3 = 5,
+ AdobeRGB = 6,
+ Wide = 7,
+ BT2020 = 8,
+ ProPhoto = 9,
+ UltraWide = 10,
+ End
+};
+
namespace ColorSpaceUtilities {
// Get a pointer to a 8-bit lookup table that will convert color components
@@ -57,6 +76,9 @@ Color convertColor(const Color& srcColor,
sk_sp<SkColorFilter> createColorSpaceFilter(ColorSpace srcColorSpace,
ColorSpace dstColorSpace);
+PLATFORM_EXPORT ColorSpaceGamut getColorSpaceGamut(const WebScreenInfo&);
+ColorSpaceGamut getColorSpaceGamut(SkColorSpace*);
+
} // namespace ColorSpaceUtilities
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698