Changeset 206845 in webkit


Ignore:
Timestamp:
Oct 5, 2016 10:15:32 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

    r206843 r206845  
     12016-10-05  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        Add a new ColorSpace for Display P3.
     10
     11        This will be tested once the Color class can create
     12        objects that reference other color spaces.
     13
     14        * platform/graphics/ColorSpace.h:
     15        * platform/graphics/cg/GraphicsContextCG.cpp:
     16        (WebCore::displayP3ColorSpaceRef):
     17        * platform/graphics/cg/GraphicsContextCG.h:
     18        (WebCore::cachedCGColorSpace):
     19
    1202016-10-05  Wenson Hsieh  <wenson_hsieh@apple.com>
    221
  • trunk/Source/WebCore/platform/graphics/ColorSpace.h

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

    r206830 r206845  
    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

    r199071 r206845  
    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.