Title: [207366] trunk/Source/WebCore
- Revision
- 207366
- Author
- d...@apple.com
- Date
- 2016-10-14 17:37:45 -0700 (Fri, 14 Oct 2016)
Log Message
Add Display P3 ColorSpace
https://bugs.webkit.org/show_bug.cgi?id=162880
<rdar://problem/28598564>
Reviewed by Sam Weinig.
Add a new ColorSpace for Display P3.
This will be tested once the Color class can create
objects that reference other color spaces.
* platform/graphics/ColorSpace.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::displayP3ColorSpaceRef):
* platform/graphics/cg/GraphicsContextCG.h:
(WebCore::cachedCGColorSpace):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (207365 => 207366)
--- trunk/Source/WebCore/ChangeLog 2016-10-15 00:37:04 UTC (rev 207365)
+++ trunk/Source/WebCore/ChangeLog 2016-10-15 00:37:45 UTC (rev 207366)
@@ -1,3 +1,24 @@
+2016-10-14 Dean Jackson <d...@apple.com>
+
+ Add Display P3 ColorSpace
+ https://bugs.webkit.org/show_bug.cgi?id=162880
+ <rdar://problem/28598564>
+
+ Reviewed by Sam Weinig.
+
+ Re-landing with a version that hopefully compiles on El Capitan.
+
+ Add a new ColorSpace for Display P3.
+
+ This will be tested once the Color class can create
+ objects that reference other color spaces.
+
+ * platform/graphics/ColorSpace.h:
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::displayP3ColorSpaceRef):
+ * platform/graphics/cg/GraphicsContextCG.h:
+ (WebCore::cachedCGColorSpace):
+
2016-10-14 Brent Fulgham <bfulg...@apple.com>
[Win][Direct2D] Minor cleanups
Modified: trunk/Source/WebCore/platform/graphics/ColorSpace.h (207365 => 207366)
--- trunk/Source/WebCore/platform/graphics/ColorSpace.h 2016-10-15 00:37:04 UTC (rev 207365)
+++ trunk/Source/WebCore/platform/graphics/ColorSpace.h 2016-10-15 00:37:45 UTC (rev 207366)
@@ -31,7 +31,8 @@
enum ColorSpace {
ColorSpaceDeviceRGB,
ColorSpaceSRGB,
- ColorSpaceLinearRGB
+ ColorSpaceLinearRGB,
+ ColorSpaceDisplayP3
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (207365 => 207366)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2016-10-15 00:37:04 UTC (rev 207365)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2016-10-15 00:37:45 UTC (rev 207366)
@@ -94,6 +94,16 @@
return sRGBSpace;
}
+CGColorSpaceRef displayP3ColorSpaceRef()
+{
+#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 101100)
+ static CGColorSpaceRef displayP3Space = CGColorSpaceCreateWithName(kCGColorSpaceDisplayP3);
+#else
+ static CGColorSpaceRef displayP3Space = sRGBColorSpaceRef();
+#endif
+ return displayP3Space;
+}
+
#if PLATFORM(WIN)
CGColorSpaceRef linearRGBColorSpaceRef()
{
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h (207365 => 207366)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h 2016-10-15 00:37:04 UTC (rev 207365)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h 2016-10-15 00:37:45 UTC (rev 207366)
@@ -34,6 +34,7 @@
CGColorSpaceRef deviceRGBColorSpaceRef();
WEBCORE_EXPORT CGColorSpaceRef sRGBColorSpaceRef();
+WEBCORE_EXPORT CGColorSpaceRef displayP3ColorSpaceRef();
CGColorSpaceRef linearRGBColorSpaceRef();
inline CGAffineTransform getUserToBaseCTM(CGContextRef context)
@@ -50,6 +51,8 @@
return sRGBColorSpaceRef();
case ColorSpaceLinearRGB:
return linearRGBColorSpaceRef();
+ case ColorSpaceDisplayP3:
+ return displayP3ColorSpaceRef();
}
ASSERT_NOT_REACHED();
return deviceRGBColorSpaceRef();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes