Diff
Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog 2015-11-16 19:45:15 UTC (rev 192479)
@@ -1,3 +1,58 @@
+2015-11-16 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r192138. rdar://problem/22846841
+
+ 2015-11-07 Simon Fraser <simon.fra...@apple.com>
+
+ Use ColorSpaceSRGB for image buffers everywhere
+ https://bugs.webkit.org/show_bug.cgi?id=150990
+
+ Reviewed by Zalan Bujtas.
+
+ ColorSpaceSRGB and ColorSpaceDeviceRGB are equivalent now, so convert
+ code that creates image buffers tagged with ColorSpaceDeviceRGB to use ColorSpaceSRGB.
+
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::createCompatibleBuffer):
+ * platform/graphics/ImageBuffer.h:
+ (WebCore::ImageBuffer::create):
+ * platform/graphics/cg/BitmapImageCG.cpp:
+ (WebCore::BitmapImage::checkForSolidColor):
+ * platform/graphics/cg/ColorCG.cpp:
+ (WebCore::Color::Color):
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::sRGBColorSpaceRef): Deleted.
+ * platform/graphics/cg/ImageBufferCG.cpp:
+ (WebCore::ImageBuffer::putByteArray):
+ * platform/graphics/cocoa/IOSurface.mm:
+ (IOSurface::createFromImage):
+ * platform/graphics/filters/FEFlood.h:
+ * platform/graphics/filters/FETile.cpp:
+ (WebCore::FETile::platformApplySoftware):
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::FilterEffect):
+ * platform/graphics/filters/SourceGraphic.h:
+ (WebCore::SourceGraphic::SourceGraphic):
+ * rendering/FilterEffectRenderer.cpp:
+ (WebCore::FilterEffectRenderer::build):
+ (WebCore::FilterEffectRenderer::apply):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintProgressBar):
+ * rendering/svg/RenderSVGResourceClipper.cpp:
+ (WebCore::RenderSVGResourceClipper::applyClippingToContext):
+ * rendering/svg/RenderSVGResourceFilter.cpp:
+ (WebCore::RenderSVGResourceFilter::buildPrimitives):
+ * rendering/svg/RenderSVGResourceGradient.cpp:
+ (WebCore::createMaskAndSwapContextForTextGradient):
+ * rendering/svg/RenderSVGResourceMasker.cpp:
+ (WebCore::RenderSVGResourceMasker::applyResource):
+ * rendering/svg/RenderSVGResourcePattern.cpp:
+ (WebCore::RenderSVGResourcePattern::createTileImage):
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::drawPatternForContainer):
+ * svg/graphics/filters/SVGFEImage.cpp:
+ (WebCore::FEImage::platformApplySoftware):
+
2015-11-13 Matthew Hanson <matthew_han...@apple.com>
Merge r192269. rdar://problem/23189742
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/GraphicsContext.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/GraphicsContext.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/GraphicsContext.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -640,7 +640,7 @@
AffineTransform transform = getCTM(DefinitelyIncludeDeviceScale);
FloatSize scaledSize(static_cast<int>(ceil(size.width() * transform.xScale())), static_cast<int>(ceil(size.height() * transform.yScale())));
- std::unique_ptr<ImageBuffer> buffer = ImageBuffer::createCompatibleBuffer(scaledSize, 1, ColorSpaceDeviceRGB, this, hasAlpha);
+ std::unique_ptr<ImageBuffer> buffer = ImageBuffer::createCompatibleBuffer(scaledSize, 1, ColorSpaceSRGB, this, hasAlpha);
if (!buffer)
return nullptr;
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/ImageBuffer.h (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/ImageBuffer.h 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/ImageBuffer.h 2015-11-16 19:45:15 UTC (rev 192479)
@@ -75,7 +75,7 @@
WTF_MAKE_NONCOPYABLE(ImageBuffer); WTF_MAKE_FAST_ALLOCATED;
public:
// Will return a null pointer on allocation failure.
- static std::unique_ptr<ImageBuffer> create(const FloatSize& size, float resolutionScale = 1, ColorSpace colorSpace = ColorSpaceDeviceRGB, RenderingMode renderingMode = Unaccelerated)
+ static std::unique_ptr<ImageBuffer> create(const FloatSize& size, float resolutionScale = 1, ColorSpace colorSpace = ColorSpaceSRGB, RenderingMode renderingMode = Unaccelerated)
{
bool success = false;
std::unique_ptr<ImageBuffer> buffer(new ImageBuffer(size, resolutionScale, colorSpace, renderingMode, success));
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -155,7 +155,7 @@
// Currently we only check for solid color in the important special case of a 1x1 image.
if (CGImageGetWidth(image) == 1 && CGImageGetHeight(image) == 1) {
unsigned char pixel[4]; // RGBA
- RetainPtr<CGContextRef> bitmapContext = adoptCF(CGBitmapContextCreate(pixel, 1, 1, 8, sizeof(pixel), deviceRGBColorSpaceRef(),
+ RetainPtr<CGContextRef> bitmapContext = adoptCF(CGBitmapContextCreate(pixel, 1, 1, 8, sizeof(pixel), sRGBColorSpaceRef(),
kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big));
if (!bitmapContext)
return;
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/ColorCG.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/ColorCG.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/ColorCG.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -67,6 +67,7 @@
size_t numComponents = CGColorGetNumberOfComponents(color);
const CGFloat* components = CGColorGetComponents(color);
#else
+ // FIXME: can we remove this?
RetainPtr<CGColorRef> correctedColor = adoptCF(createCGColorWithDeviceRGBA(color));
if (!correctedColor)
correctedColor = color;
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -81,9 +81,6 @@
CGColorSpaceRef sRGBColorSpaceRef()
{
-#if PLATFORM(IOS)
- return deviceRGBColorSpaceRef();
-#else
static CGColorSpaceRef sRGBSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
#if PLATFORM(WIN)
// Out-of-date CG installations will not honor kCGColorSpaceSRGB. This logic avoids
@@ -93,7 +90,6 @@
sRGBSpace = deviceRGBColorSpaceRef();
#endif // PLATFORM(WIN)
return sRGBSpace;
-#endif // PLATFORM(IOS)
}
#if PLATFORM(WIN) || PLATFORM(IOS)
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -322,7 +322,7 @@
#if USE(IOSURFACE_CANVAS_BACKING_STORE)
// Make a copy of the source to ensure the bits don't change before being drawn
IntSize sourceCopySize(sourceRect.width(), sourceRect.height());
- std::unique_ptr<ImageBuffer> sourceCopy = ImageBuffer::create(sourceCopySize, 1, ColorSpaceDeviceRGB, Unaccelerated);
+ std::unique_ptr<ImageBuffer> sourceCopy = ImageBuffer::create(sourceCopySize, 1, ColorSpaceSRGB, Unaccelerated);
if (!sourceCopy)
return;
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cocoa/IOSurface.mm 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/cocoa/IOSurface.mm 2015-11-16 19:45:15 UTC (rev 192479)
@@ -88,7 +88,7 @@
size_t width = CGImageGetWidth(image);
size_t height = CGImageGetHeight(image);
- auto surface = IOSurface::create(IntSize(width, height), ColorSpaceDeviceRGB);
+ auto surface = IOSurface::create(IntSize(width, height), ColorSpaceSRGB);
auto surfaceContext = surface->ensurePlatformContext();
CGContextDrawImage(surfaceContext, CGRectMake(0, 0, width, height), image);
CGContextFlush(surfaceContext);
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FEFlood.h (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FEFlood.h 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FEFlood.h 2015-11-16 19:45:15 UTC (rev 192479)
@@ -41,8 +41,8 @@
#if !USE(CG)
// feFlood does not perform color interpolation of any kind, so the result is always in the current
// color space regardless of the value of color-interpolation-filters.
- void setOperatingColorSpace(ColorSpace) override { FilterEffect::setResultColorSpace(ColorSpaceDeviceRGB); }
- void setResultColorSpace(ColorSpace) override { FilterEffect::setResultColorSpace(ColorSpaceDeviceRGB); }
+ void setOperatingColorSpace(ColorSpace) override { FilterEffect::setResultColorSpace(ColorSpaceSRGB); }
+ void setResultColorSpace(ColorSpace) override { FilterEffect::setResultColorSpace(ColorSpaceSRGB); }
#endif
virtual void platformApplySoftware() override;
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FETile.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FETile.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FETile.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -63,7 +63,7 @@
tileRect.scale(filter.filterResolution().width(), filter.filterResolution().height());
}
- auto tileImage = SVGRenderingContext::createImageBuffer(tileRect, tileRect, ColorSpaceDeviceRGB, filter().renderingMode());
+ auto tileImage = SVGRenderingContext::createImageBuffer(tileRect, tileRect, ColorSpaceSRGB, filter().renderingMode());
if (!tileImage)
return;
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FilterEffect.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FilterEffect.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/FilterEffect.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -46,7 +46,7 @@
, m_hasHeight(false)
, m_clipsToBounds(true)
, m_operatingColorSpace(ColorSpaceLinearRGB)
- , m_resultColorSpace(ColorSpaceDeviceRGB)
+ , m_resultColorSpace(ColorSpaceSRGB)
{
}
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/SourceGraphic.h (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/SourceGraphic.h 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/filters/SourceGraphic.h 2015-11-16 19:45:15 UTC (rev 192479)
@@ -48,7 +48,7 @@
SourceGraphic(Filter& filter)
: FilterEffect(filter)
{
- setOperatingColorSpace(ColorSpaceDeviceRGB);
+ setOperatingColorSpace(ColorSpaceSRGB);
}
};
Modified: branches/safari-601.1.46-branch/Source/WebCore/rendering/FilterEffectRenderer.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/rendering/FilterEffectRenderer.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/rendering/FilterEffectRenderer.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -284,7 +284,7 @@
// Unlike SVG Filters and CSSFilterImages, filter functions on the filter
// property applied here should not clip to their primitive subregions.
effect->setClipsToBounds(consumer == FilterFunction);
- effect->setOperatingColorSpace(ColorSpaceDeviceRGB);
+ effect->setOperatingColorSpace(ColorSpaceSRGB);
if (filterOperation.type() != FilterOperation::REFERENCE) {
effect->inputEffects().append(previousEffect);
@@ -339,7 +339,7 @@
{
RefPtr<FilterEffect> effect = lastEffect();
effect->apply();
- effect->transformResultColorSpace(ColorSpaceDeviceRGB);
+ effect->transformResultColorSpace(ColorSpaceSRGB);
}
LayoutRect FilterEffectRenderer::computeSourceImageRectForDirtyRect(const LayoutRect& filterBoxRect, const LayoutRect& dirtyRect)
Modified: branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderThemeMac.mm (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderThemeMac.mm 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderThemeMac.mm 2015-11-16 19:45:15 UTC (rev 192479)
@@ -1147,7 +1147,7 @@
trackInfo.reserved = 0;
trackInfo.filler1 = 0;
- std::unique_ptr<ImageBuffer> imageBuffer = ImageBuffer::createCompatibleBuffer(inflatedRect.size(), deviceScaleFactor, ColorSpaceDeviceRGB, paintInfo.context, true);
+ std::unique_ptr<ImageBuffer> imageBuffer = ImageBuffer::createCompatibleBuffer(inflatedRect.size(), deviceScaleFactor, ColorSpaceSRGB, paintInfo.context, true);
if (!imageBuffer)
return true;
Modified: branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -141,7 +141,7 @@
AffineTransform absoluteTransform = SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem(renderer);
if (shouldCreateClipperMaskImage && !repaintRect.isEmpty()) {
- clipperMaskImage = SVGRenderingContext::createImageBuffer(repaintRect, absoluteTransform, ColorSpaceDeviceRGB, Unaccelerated);
+ clipperMaskImage = SVGRenderingContext::createImageBuffer(repaintRect, absoluteTransform, ColorSpaceSRGB, Unaccelerated);
if (!clipperMaskImage)
return false;
Modified: branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -90,7 +90,7 @@
builder->appendEffectToEffectReferences(effect, element.renderer());
element.setStandardAttributes(effect.get());
effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(&element, filterElement().primitiveUnits(), targetBoundingBox));
- effect->setOperatingColorSpace(element.renderer()->style().svgStyle().colorInterpolationFilters() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB);
+ effect->setOperatingColorSpace(element.renderer()->style().svgStyle().colorInterpolationFilters() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceSRGB);
builder->add(element.result(), effect.release());
}
return builder;
Modified: branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -61,7 +61,7 @@
AffineTransform absoluteTransform = SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem(*textRootBlock);
FloatRect repaintRect = textRootBlock->repaintRectInLocalCoordinates();
- auto maskImage = SVGRenderingContext::createImageBuffer(repaintRect, absoluteTransform, ColorSpaceDeviceRGB, Unaccelerated);
+ auto maskImage = SVGRenderingContext::createImageBuffer(repaintRect, absoluteTransform, ColorSpaceSRGB, Unaccelerated);
if (!maskImage)
return false;
Modified: branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -68,7 +68,7 @@
if (!maskerData->maskImage && !repaintRect.isEmpty()) {
const SVGRenderStyle& svgStyle = style().svgStyle();
- ColorSpace colorSpace = svgStyle.colorInterpolation() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB;
+ ColorSpace colorSpace = svgStyle.colorInterpolation() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceSRGB;
maskerData->maskImage = SVGRenderingContext::createImageBuffer(repaintRect, absoluteTransform, colorSpace, Unaccelerated);
if (!maskerData->maskImage)
return false;
Modified: branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -233,7 +233,7 @@
std::unique_ptr<ImageBuffer> RenderSVGResourcePattern::createTileImage(const PatternAttributes& attributes, const FloatRect& tileBoundaries, const FloatRect& absoluteTileBoundaries, const AffineTransform& tileImageTransform, FloatRect& clampedAbsoluteTileBoundaries) const
{
clampedAbsoluteTileBoundaries = ImageBuffer::clampedRect(absoluteTileBoundaries);
- auto tileImage = SVGRenderingContext::createImageBuffer(absoluteTileBoundaries, clampedAbsoluteTileBoundaries, ColorSpaceDeviceRGB, Unaccelerated);
+ auto tileImage = SVGRenderingContext::createImageBuffer(absoluteTileBoundaries, clampedAbsoluteTileBoundaries, ColorSpaceSRGB, Unaccelerated);
if (!tileImage)
return nullptr;
Modified: branches/safari-601.1.46-branch/Source/WebCore/svg/graphics/SVGImage.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/svg/graphics/SVGImage.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/svg/graphics/SVGImage.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -199,7 +199,7 @@
FloatRect imageBufferSize = zoomedContainerRect;
imageBufferSize.scale(imageBufferScale.width(), imageBufferScale.height());
- std::unique_ptr<ImageBuffer> buffer = ImageBuffer::createCompatibleBuffer(expandedIntSize(imageBufferSize.size()), 1, ColorSpaceDeviceRGB, context, true);
+ std::unique_ptr<ImageBuffer> buffer = ImageBuffer::createCompatibleBuffer(expandedIntSize(imageBufferSize.size()), 1, ColorSpaceSRGB, context, true);
if (!buffer) // Failed to allocate buffer.
return;
drawForContainer(buffer->context(), containerSize, zoom, imageBufferSize, zoomedContainerRect, ColorSpaceDeviceRGB, CompositeSourceOver, BlendModeNormal);
Modified: branches/safari-601.1.46-branch/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp 2015-11-16 19:45:15 UTC (rev 192479)
@@ -112,8 +112,8 @@
IntPoint paintLocation = absolutePaintRect().location();
destRect.move(-paintLocation.x(), -paintLocation.y());
- // FEImage results are always in ColorSpaceDeviceRGB
- setResultColorSpace(ColorSpaceDeviceRGB);
+ // FEImage results are always in ColorSpaceSRGB
+ setResultColorSpace(ColorSpaceSRGB);
if (renderer) {
const AffineTransform& absoluteTransform = filter().absoluteTransform();
Modified: branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog 2015-11-16 19:45:15 UTC (rev 192479)
@@ -1,5 +1,26 @@
2015-11-16 Matthew Hanson <matthew_han...@apple.com>
+ Merge r192138. rdar://problem/22846841
+
+ 2015-11-07 Simon Fraser <simon.fra...@apple.com>
+
+ Use ColorSpaceSRGB for image buffers everywhere
+ https://bugs.webkit.org/show_bug.cgi?id=150990
+
+ Reviewed by Zalan Bujtas.
+
+ ColorSpaceSRGB and ColorSpaceDeviceRGB are equivalent now, so convert
+ code that creates image buffers tagged with ColorSpaceDeviceRGB to use ColorSpaceSRGB.
+
+ * Shared/mac/RemoteLayerBackingStore.mm:
+ (WebKit::RemoteLayerBackingStore::decode):
+ (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _takeViewSnapshot]):
+ (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
+
+2015-11-16 Matthew Hanson <matthew_han...@apple.com>
+
Merge r189637. rdar://problem/22846841
2015-09-11 Beth Dakin <bda...@apple.com>
Modified: branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm 2015-11-16 19:45:15 UTC (rev 192479)
@@ -139,7 +139,7 @@
MachSendRight sendRight;
if (!decoder.decode(sendRight))
return false;
- result.m_frontBuffer.surface = IOSurface::createFromSendRight(sendRight, ColorSpaceDeviceRGB);
+ result.m_frontBuffer.surface = IOSurface::createFromSendRight(sendRight, ColorSpaceSRGB);
return true;
}
#endif
@@ -186,7 +186,7 @@
std::swap(m_frontBuffer, m_backBuffer);
if (!m_frontBuffer.surface)
- m_frontBuffer.surface = IOSurface::create(expandedScaledSize, ColorSpaceDeviceRGB);
+ m_frontBuffer.surface = IOSurface::create(expandedScaledSize, ColorSpaceSRGB);
setBufferVolatility(BufferType::Front, false);
Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (192478 => 192479)
--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-11-16 19:29:34 UTC (rev 192478)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2015-11-16 19:45:15 UTC (rev 192479)
@@ -1111,7 +1111,7 @@
CATransform3D transform = CATransform3DMakeScale(deviceScale, deviceScale, 1);
#if USE(IOSURFACE)
- auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(snapshotSize), WebCore::ColorSpaceDeviceRGB);
+ auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(snapshotSize), WebCore::ColorSpaceSRGB);
CARenderServerRenderLayerWithTransform(MACH_PORT_NULL, self.layer.context.contextId, reinterpret_cast<uint64_t>(self.layer), surface->surface(), 0, 0, &transform);
RefPtr<WebKit::ViewSnapshot> viewSnapshot = WebKit::ViewSnapshot::create(nullptr);
@@ -2973,7 +2973,7 @@
#if USE(IOSURFACE)
// If we are parented and thus won't incur a significant penalty from paging in tiles, snapshot the view hierarchy directly.
if (CADisplay *display = self.window.screen._display) {
- auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(WebCore::FloatSize(imageSize)), WebCore::ColorSpaceDeviceRGB);
+ auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(WebCore::FloatSize(imageSize)), WebCore::ColorSpaceSRGB);
CGFloat imageScaleInViewCoordinates = imageWidth / rectInViewCoordinates.size.width;
CATransform3D transform = CATransform3DMakeScale(imageScaleInViewCoordinates, imageScaleInViewCoordinates, 1);
transform = CATransform3DTranslate(transform, -rectInViewCoordinates.origin.x, -rectInViewCoordinates.origin.y, 0);