-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 275091@main (cfa8125). https://bugs.webkit.org/show_bug.c…
…gi?id=268537 Regression(251234@main): [Cairo][GTK][WPE] Darker output of SVG with filters fediffuselighting https://bugs.webkit.org/show_bug.cgi?id=268537 Reviewed by Said Abou-Hallawa and Nikolas Zimmermann. Turn off the support for linearRGB color space in case of Cairo (251234@main) causes, that SVG with filter, where linearRGB as inputs is demanded, generates darker output. The SVG spec says that SourceGraphic has to be in linearRGB color space: https://www.w3.org/TR/filter-effects-1/#attr-valuedef-in-sourcegraphic In case of Cairo (which operates in SRGB color space) the image source (SourceGraphic) should be created in SRGB and before passing it to filters, it should be transformed to linearRGB color space. * LayoutTests/TestExpectations: * LayoutTests/platform/glib/TestExpectations: Remove some tests which pass with this change * LayoutTests/svg/filters/feConvolveMatrix-clipped.svg: * LayoutTests/svg/filters/feGaussianBlur-clipped.svg: * LayoutTests/fast/gradients/conic-gradient-extended-stops.html: Add possible differences in outputs * Source/WebCore/platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::filteredNativeImage): Pass color space to endDrawSourceImage * Source/WebCore/platform/graphics/filters/FEDropShadow.h: Force to use SRGB as operating color space for DropShadow in case of Cairo. * Source/WebCore/platform/graphics/filters/FilterImageTargetSwitcher.cpp: (WebCore::FilterImageTargetSwitcher::endClipAndDrawSourceImage): (WebCore::FilterImageTargetSwitcher::endDrawSourceImage): Before applying all filter, the source image has to be translated to requested color space (only valid for Cairo). * Source/WebCore/platform/graphics/filters/FilterTargetSwitcher.h: * Source/WebCore/platform/graphics/filters/FilterImageTargetSwitcher.h: * Source/WebCore/platform/graphics/filters/FilterStyleTargetSwitcher.h: Added color space as additional parameter. * Source/WebCore/platform/graphics/filters/FilterStyleTargetSwitcher.cpp: (WebCore::FilterStyleTargetSwitcher::endDrawSourceImage): WebCore::FilterStyleTargetSwitcher::endDrawSourceImage does not use color space so just ignore it * Source/WebCore/rendering/RenderLayerFilters.cpp: (WebCore::RenderLayerFilters::applyFilterEffect): Just pass DestinationColorSpace::SRGB() to endClipAndDrawSourceImage. * Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceFilter.cpp: (WebCore::LegacyRenderSVGResourceFilter::applyResource): In case of Cairo, the sourceImage has to be created with sRGB color space, because Cairo operates in sRGB. The linearRGB color space will be passed to TargetSwitcher in WebCore::LegacyRenderSVGResourceFilter::postApplyResource and the sourceImage will be transformed to linearRGB before all filter applying. (WebCore::LegacyRenderSVGResourceFilter::postApplyResource): Before applying all filter, the source image has to be translated to requested color space. * Source/WebCore/svg/graphics/filters/SVGFilter.cpp: (WebCore::buildFilterEffectsGraph): Create SourceGraphic and SourceAlpha with LinearRGB color space if color-interpolation_filter attribute of the Filter has LinearRGB value (only in case of Cairo). Canonical link: https://commits.webkit.org/275091@main Canonical link: https://commits.webkit.org/274313.44@webkitglib/2.44
- Loading branch information
1 parent
e73c807
commit 5eb5ab6
Showing
16 changed files
with
35 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters