Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move constants for Sepia Tone and Grayscale filters to a separate file #4222

Conversation

smfr
Copy link
Contributor

@smfr smfr commented Sep 10, 2022

17983d2

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

592e15c

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe   πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv   πŸ§ͺ mac-wk1
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress

@smfr smfr self-assigned this Sep 10, 2022
@smfr smfr added 528+ (Nightly build) Layout and Rendering For bugs with layout and rendering of Web pages. labels Sep 10, 2022
@@ -457,28 +439,23 @@
}

#if USE_CA_FILTERS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#if USE(CA_FILTERS)?

@smfr smfr added the merge-queue Applied to send a pull request to merge-queue label Sep 10, 2022
@webkit-commit-queue
Copy link
Collaborator

Committed 254358@main (17983d2): https://commits.webkit.org/254358@main

Reviewed commits have been landed. Closing PR #4222 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/Move-constants-for-Sepia-Tone-and-Grayscale-filters-to-a-separate-file branch from 592e15c to 17983d2 Compare September 10, 2022 22:54
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layout and Rendering For bugs with layout and rendering of Web pages.
Projects
None yet
4 participants