Changeset 207366 in webkit


Ignore:
Timestamp:
Oct 14, 2016 5:37:45 PM (8 years ago)
Author:
dino@apple.com
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):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207365 r207366  
     12016-10-14  Dean Jackson  <dino@apple.com>
     2
     3        Add Display P3 ColorSpace
     4        https://bugs.webkit.org/show_bug.cgi?id=162880
     5        <rdar://problem/28598564>
     6
     7        Reviewed by Sam Weinig.
     8
     9        Re-landing with a version that hopefully compiles on El Capitan.
     10
     11        Add a new ColorSpace for Display P3.
     12
     13        This will be tested once the Color class can create
     14        objects that reference other color spaces.
     15
     16        * platform/graphics/ColorSpace.h:
     17        * platform/graphics/cg/GraphicsContextCG.cpp:
     18        (WebCore::displayP3ColorSpaceRef):
     19        * platform/graphics/cg/GraphicsContextCG.h:
     20        (WebCore::cachedCGColorSpace):
     21
    1222016-10-14  Brent Fulgham  <bfulgham@apple.com>
    223
  • trunk/Source/WebCore/platform/graphics/ColorSpace.h

    r206852 r207366  
    3232    ColorSpaceDeviceRGB,
    3333    ColorSpaceSRGB,
    34     ColorSpaceLinearRGB
     34    ColorSpaceLinearRGB,
     35    ColorSpaceDisplayP3
    3536};
    3637   
  • trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp

    r207002 r207366  
    9393#endif // PLATFORM(WIN)
    9494    return sRGBSpace;
     95}
     96
     97CGColorSpaceRef displayP3ColorSpaceRef()
     98{
     99#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 101100)
     100    static CGColorSpaceRef displayP3Space = CGColorSpaceCreateWithName(kCGColorSpaceDisplayP3);
     101#else
     102    static CGColorSpaceRef displayP3Space = sRGBColorSpaceRef();
     103#endif
     104    return displayP3Space;
    95105}
    96106
  • trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h

    r206852 r207366  
    3535CGColorSpaceRef deviceRGBColorSpaceRef();
    3636WEBCORE_EXPORT CGColorSpaceRef sRGBColorSpaceRef();
     37WEBCORE_EXPORT CGColorSpaceRef displayP3ColorSpaceRef();
    3738CGColorSpaceRef linearRGBColorSpaceRef();
    3839
     
    5152    case ColorSpaceLinearRGB:
    5253        return linearRGBColorSpaceRef();
     54    case ColorSpaceDisplayP3:
     55        return displayP3ColorSpaceRef();
    5356    }
    5457    ASSERT_NOT_REACHED();
Note: See TracChangeset for help on using the changeset viewer.