WebKit icon indicating copy to clipboard operation
WebKit copied to clipboard

[Filters] Move the static createEffect functions to the FilterOperation classes

Open shallawa opened this issue 3 years ago • 0 comments

543580ddc47bec3c192071142bdd2762d9f65d47

[Filters] Move the static createEffect functions to the FilterOperation classes
https://bugs.webkit.org/show_bug.cgi?id=243748

Reviewed by NOBODY (OOPS!).

The CSS FilterOperations have a hierarchy of base and super classes. Instead of
having static createEffect functions in CSSFilter.cpp for every FilterOperation
we can make them virtual functions and make CSSFilter::buildFilterFunctions()
call them through the base class FilterOperation.

* Source/WebCore/platform/graphics/filters/FilterEffect.h:
* Source/WebCore/platform/graphics/filters/FilterFunction.h:
* Source/WebCore/platform/graphics/filters/FilterOperation.cpp:
(WebCore::ReferenceFilterOperation::createFilterEffect const):
(WebCore::createGrayScaleEffect):
(WebCore::createSepiaEffect):
(WebCore::createSaturateEffect):
(WebCore::createHueRotateEffect):
(WebCore::BasicColorMatrixFilterOperation::createFilterEffect const):
(WebCore::createInvertEffect):
(WebCore::createOpacityEffect):
(WebCore::createBrightnessEffect):
(WebCore::createContrastEffect):
(WebCore::BasicComponentTransferFilterOperation::createFilterEffect const):
(WebCore::BlurFilterOperation::createFilterEffect const):
(WebCore::DropShadowFilterOperation::createFilterEffect const):
* Source/WebCore/platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::createFilterEffect const):
* Source/WebCore/rendering/CSSFilter.cpp:
(WebCore::CSSFilter::buildFilterFunctions):
(WebCore::createBlurEffect): Deleted.
(WebCore::createBrightnessEffect): Deleted.
(WebCore::createContrastEffect): Deleted.
(WebCore::createDropShadowEffect): Deleted.
(WebCore::createGrayScaleEffect): Deleted.
(WebCore::createHueRotateEffect): Deleted.
(WebCore::createInvertEffect): Deleted.
(WebCore::createOpacityEffect): Deleted.
(WebCore::createSaturateEffect): Deleted.
(WebCore::createSepiaEffect): Deleted.

shallawa avatar Aug 09 '22 20:08 shallawa