[webkit-changes] [WebKit/WebKit] 99370f: Change all enums under WebCore/platform/graphics/f...

Mikhail R. Gadelha noreply at github.com
Wed Jan 17 14:34:12 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 99370f48350dfae138b30520042652145a85eff8
      https://github.com/WebKit/WebKit/commit/99370f48350dfae138b30520042652145a85eff8
  Author: Mikhail R. Gadelha <mikhail at igalia.com>
  Date:   2024-01-17 (Wed, 17 Jan 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/coreimage/FEColorMatrixCoreImageApplier.mm
    M Source/WebCore/platform/graphics/coreimage/FEComponentTransferCoreImageApplier.mm
    M Source/WebCore/platform/graphics/cpu/arm/filters/FECompositeNeonArithmeticApplier.cpp
    M Source/WebCore/platform/graphics/filters/DistantLightSource.cpp
    M Source/WebCore/platform/graphics/filters/DistantLightSource.h
    M Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp
    M Source/WebCore/platform/graphics/filters/FEColorMatrix.h
    M Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp
    M Source/WebCore/platform/graphics/filters/FEComponentTransfer.h
    M Source/WebCore/platform/graphics/filters/FEComposite.cpp
    M Source/WebCore/platform/graphics/filters/FEComposite.h
    M Source/WebCore/platform/graphics/filters/FEConvolveMatrix.h
    M Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp
    M Source/WebCore/platform/graphics/filters/FEDisplacementMap.h
    M Source/WebCore/platform/graphics/filters/FEMorphology.h
    M Source/WebCore/platform/graphics/filters/FETurbulence.h
    M Source/WebCore/platform/graphics/filters/FilterFunction.h
    M Source/WebCore/platform/graphics/filters/FilterOperation.h
    M Source/WebCore/platform/graphics/filters/FilterRenderingMode.h
    M Source/WebCore/platform/graphics/filters/LightSource.h
    M Source/WebCore/platform/graphics/filters/PointLightSource.cpp
    M Source/WebCore/platform/graphics/filters/PointLightSource.h
    M Source/WebCore/platform/graphics/filters/SpotLightSource.cpp
    M Source/WebCore/platform/graphics/filters/SpotLightSource.h
    M Source/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp
    M Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp
    M Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp
    M Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareArithmeticApplier.cpp
    M Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h
    M Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp
    M Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h
    M Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.h
    M Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.h
    M Source/WebCore/rendering/CSSFilter.cpp
    M Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp
    M Source/WebCore/svg/SVGComponentTransferFunctionElement.h
    M Source/WebCore/svg/SVGFEColorMatrixElement.cpp
    M Source/WebCore/svg/SVGFEColorMatrixElement.h
    M Source/WebCore/svg/SVGFECompositeElement.cpp
    M Source/WebCore/svg/SVGFECompositeElement.h
    M Source/WebCore/svg/SVGFEDisplacementMapElement.cpp
    M Source/WebCore/svg/SVGFEDisplacementMapElement.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Change all enums under WebCore/platform/graphics/filters/ to use serializer
https://bugs.webkit.org/show_bug.cgi?id=264834

Reviewed by Chris Dumez.

This patch changes all enums so they don't use the EnumTraits template
anymore.

Most of the patch is straightforward: it turns the enum into enum classes,
adds an uint8_t type specifier to the enum classes, and adds the enum scope
in the call sites. The only change that doesn't follow this is the
removal of FEFirst and FELast from FilterFunction::Type, default values
for the start and end of a subset of values in the enum; they are only
ever used in the isFilterEffect() function, so I just replaced them with
the actual values.

* Source/WebCore/platform/graphics/coreimage/FEColorMatrixCoreImageApplier.mm:
(WebCore::FEColorMatrixCoreImageApplier::supportsCoreImageRendering):
(WebCore::FEColorMatrixCoreImageApplier::apply const):
* Source/WebCore/platform/graphics/coreimage/FEComponentTransferCoreImageApplier.mm:
(WebCore::FEComponentTransferCoreImageApplier::supportsCoreImageRendering):
(WebCore::FEComponentTransferCoreImageApplier::apply const):
* Source/WebCore/platform/graphics/cpu/arm/filters/FECompositeNeonArithmeticApplier.cpp:
(WebCore::FECompositeNeonArithmeticApplier::FECompositeNeonArithmeticApplier):
* Source/WebCore/platform/graphics/filters/DistantLightSource.cpp:
(WebCore::DistantLightSource::DistantLightSource):
* Source/WebCore/platform/graphics/filters/DistantLightSource.h:
* Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::resultIsAlphaImage const):
(WebCore::FEColorMatrix::supportedFilterRenderingModes const):
(WebCore::operator<<):
* Source/WebCore/platform/graphics/filters/FEColorMatrix.h:
* Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/graphics/filters/FEComponentTransfer.h:
* Source/WebCore/platform/graphics/filters/FEComposite.cpp:
(WebCore::FEComposite::calculateImageRect const):
(WebCore::FEComposite::createSoftwareApplier const):
(WebCore::operator<<):
(WebCore::FEComposite::externalRepresentation const):
* Source/WebCore/platform/graphics/filters/FEComposite.h:
* Source/WebCore/platform/graphics/filters/FEConvolveMatrix.h:
* Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/graphics/filters/FEDisplacementMap.h:
* Source/WebCore/platform/graphics/filters/FEMorphology.h:
* Source/WebCore/platform/graphics/filters/FETurbulence.h:
* Source/WebCore/platform/graphics/filters/FilterFunction.h:
(WebCore::FilterFunction::isFilterEffect const):
* Source/WebCore/platform/graphics/filters/FilterOperation.h:
* Source/WebCore/platform/graphics/filters/FilterRenderingMode.h:
* Source/WebCore/platform/graphics/filters/LightSource.h:
(): Deleted.
* Source/WebCore/platform/graphics/filters/PointLightSource.cpp:
(WebCore::PointLightSource::PointLightSource):
* Source/WebCore/platform/graphics/filters/PointLightSource.h:
* Source/WebCore/platform/graphics/filters/SpotLightSource.cpp:
(WebCore::SpotLightSource::SpotLightSource):
* Source/WebCore/platform/graphics/filters/SpotLightSource.h:
* Source/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp:
(WebCore::FEColorMatrixSoftwareApplier::FEColorMatrixSoftwareApplier):
(WebCore::FEColorMatrixSoftwareApplier::applyPlatformAccelerated const):
(WebCore::FEColorMatrixSoftwareApplier::applyPlatformUnaccelerated const):
(WebCore::FEColorMatrixSoftwareApplier::applyPlatform const):
* Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp:
(WebCore::FEComponentTransferSoftwareApplier::computeLookupTable):
* Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp:
(WebCore::FECompositeSoftwareApplier::FECompositeSoftwareApplier):
(WebCore::FECompositeSoftwareApplier::apply const):
* Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareArithmeticApplier.cpp:
(WebCore::FECompositeSoftwareArithmeticApplier::FECompositeSoftwareArithmeticApplier):
* Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h:
* Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp:
(WebCore::FEDisplacementMapSoftwareApplier::FEDisplacementMapSoftwareApplier):
(WebCore::FEDisplacementMapSoftwareApplier::xChannelIndex const):
(WebCore::FEDisplacementMapSoftwareApplier::yChannelIndex const):
* Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h:
* Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.h:
* Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.h:
* Source/WebCore/rendering/CSSFilter.cpp:
(WebCore::createBrightnessEffect):
(WebCore::createContrastEffect):
(WebCore::createGrayScaleEffect):
(WebCore::createHueRotateEffect):
(WebCore::createInvertEffect):
(WebCore::createOpacityEffect):
(WebCore::createSaturateEffect):
(WebCore::createSepiaEffect):
* Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::attributeChanged):
* Source/WebCore/svg/SVGComponentTransferFunctionElement.h:
(WebCore::SVGPropertyTraits<ComponentTransferType>::highestEnumValue):
(WebCore::SVGPropertyTraits<ComponentTransferType>::toString):
(WebCore::SVGPropertyTraits<ComponentTransferType>::fromString):
* Source/WebCore/svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::isInvalidValuesLength const):
(WebCore::SVGFEColorMatrixElement::attributeChanged):
(WebCore::SVGFEColorMatrixElement::createFilterEffect const):
* Source/WebCore/svg/SVGFEColorMatrixElement.h:
(WebCore::SVGPropertyTraits<ColorMatrixType>::highestEnumValue):
(WebCore::SVGPropertyTraits<ColorMatrixType>::toString):
(WebCore::SVGPropertyTraits<ColorMatrixType>::fromString):
* Source/WebCore/svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::attributeChanged):
* Source/WebCore/svg/SVGFECompositeElement.h:
(WebCore::SVGIDLEnumLimits<CompositeOperationType>::highestExposedEnumValue):
(WebCore::SVGPropertyTraits<CompositeOperationType>::highestEnumValue):
(WebCore::SVGPropertyTraits<CompositeOperationType>::toString):
(WebCore::SVGPropertyTraits<CompositeOperationType>::fromString):
* Source/WebCore/svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::attributeChanged):
* Source/WebCore/svg/SVGFEDisplacementMapElement.h:
(WebCore::SVGPropertyTraits<ChannelSelectorType>::highestEnumValue):
(WebCore::SVGPropertyTraits<ChannelSelectorType>::toString):
(WebCore::SVGPropertyTraits<ChannelSelectorType>::fromString):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/273147@main




More information about the webkit-changes mailing list