Remove ColorSpaceDeviceRGB and most users of the obsolete deviceRGB colorspace
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Dec 2017 21:00:37 +0000 (21:00 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Dec 2017 21:00:37 +0000 (21:00 +0000)
commit35c4489f74dfef315afbc19920aed2ac496b4d87
tree3243aeefe7ea5061f84ac017fb1562da90935ace
parent6b191c657044df919ebffcef9a07a0cad5e12f8d
Remove ColorSpaceDeviceRGB and most users of the obsolete deviceRGB colorspace
https://bugs.webkit.org/show_bug.cgi?id=180689

Reviewed by Tim Horton.

Source/WebCore:

Remove the ColorSpaceDeviceRGB enum and users.

ImageBuffer now uses sRGB instead of deviceRGB in the few cases that used the latter.

Switch Windows CG code to use sRGBColorSpaceRef() instead of deviceRGBColorSpaceRef().

Have linearRGBColorSpaceRef() use kCGColorSpaceLinearSRGB, which is present in iOS 9 and 10.11 and later.

* page/win/FrameCGWin.cpp:
(WebCore::imageFromRect):
* platform/graphics/Color.cpp:
(WebCore::operator<<):
* platform/graphics/ColorSpace.h:
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::transformColorSpace):
* platform/graphics/cg/ColorCG.cpp:
(WebCore::Color::Color):
(WebCore::leakCGColor):
(WebCore::createCGColorWithDeviceRGBA): Deleted.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::sRGBColorSpaceRef):
(WebCore::linearRGBColorSpaceRef):
(WebCore::extendedSRGBColorSpaceRef):
(WebCore::displayP3ColorSpaceRef):
(WebCore::deviceRGBColorSpaceRef): Deleted.
* platform/graphics/cg/GraphicsContextCG.h:
(WebCore::cachedCGColorSpace):
* platform/graphics/cocoa/GraphicsContextCocoa.mm:
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::CGContextWithHDC):
(WebCore::GraphicsContext::releaseWindowsContext):
(WebCore::GraphicsContext::drawWindowsBitmap):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::create):
(WebCore::BitmapImage::getHBITMAPOfSize):
* platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
(WebCore::MockRealtimeVideoSourceMac::pixelBufferFromCGImage const):
* platform/win/DragImageCGWin.cpp:
(WebCore::allocImage):
(WebCore::createCgContextFromBitmap):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::postApplyResource):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):

Source/WebKit:

Remove encoding of ColorSpaceDeviceRGB.

* Shared/WebCoreArgumentCoders.h:

Source/WebKitLegacy/mac:

Use sRGBColorSpaceRef() from WebCore.

* WebView/WebHTMLView.mm:
(imageFromRect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/win/FrameCGWin.cpp
Source/WebCore/platform/graphics/Color.cpp
Source/WebCore/platform/graphics/ColorSpace.h
Source/WebCore/platform/graphics/ImageBuffer.cpp
Source/WebCore/platform/graphics/cg/ColorCG.cpp
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
Source/WebCore/platform/graphics/win/ImageCGWin.cpp
Source/WebCore/platform/mediastream/mac/MockRealtimeVideoSourceMac.mm
Source/WebCore/platform/win/DragImageCGWin.cpp
Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebCoreArgumentCoders.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebHTMLView.mm