[webkit-changes] [WebKit/WebKit] 17983d: Move constants for Sepia Tone and Grayscale filter...
Simon Fraser
noreply at github.com
Sat Sep 10 15:54:18 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 17983d2e7c64b47d1c2dd4623547e85d4c975ca7
https://github.com/WebKit/WebKit/commit/17983d2e7c64b47d1c2dd4623547e85d4c975ca7
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2022-09-10 (Sat, 10 Sep 2022)
Changed paths:
M Source/WebCore/platform/graphics/ca/PlatformCAFilters.h
M Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm
M Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp
M Source/WebCore/rendering/CSSFilter.cpp
Log Message:
-----------
Move constants for Sepia Tone and Grayscale filters to a separate file
https://bugs.webkit.org/show_bug.cgi?id=76008
Reviewed by Myles C. Maxfield.
Use ColorMatrix as the canonical way to compute sepia and grayscale matrices, replacing duplicate code
in CSSFilter, FEColorMatrix and PlatformCAFiltersCocoa. Now the sepia and grayscale constants are only
in one place.
Made the non-USE_CA_FILTERS code path in PlatformCAFiltersCocoa compile (but this appears to be dead code).
* Source/WebCore/platform/graphics/ca/PlatformCAFilters.h:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::PlatformCAFilters::setFiltersOnLayer):
(WebCore::PlatformCAFilters::filterValueForOperation):
(WebCore::caColorMatrixFromColorMatrix):
(WebCore::PlatformCAFilters::colorMatrixValueForFilter):
* Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::calculateSaturateComponents):
(WebCore::FEColorMatrix::calculateHueRotateComponents):
* Source/WebCore/rendering/CSSFilter.cpp:
(WebCore::createGrayScaleEffect):
(WebCore::createSepiaEffect):
Canonical link: https://commits.webkit.org/254358@main
More information about the webkit-changes
mailing list