Skip to content

Commit

Permalink
Implement FELighting applier for Neon
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=267349
rdar://120791073

Reviewed by Simon Fraser.

Add a virtual method to FELightingSoftwareApplier named applyPlatformParallel() and
call it from its applyPlatform(). Add two new classes FELightingSoftwareParallelApplier
and FELightingNeonParallelApplier and make each one of them implement this method. Move
the existing code in FELightingNEON to the new class FELightingNeonParallelApplier.
Make FELightingSoftwareParallelApplier for all other platforms.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h: Removed.
* Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp: Renamed from Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp.
(WebCore::FELightingNeonParallelApplier::feLightingConstants):
(WebCore::FELightingNeonParallelApplier::getPowerCoefficients):
(WebCore::FELightingNeonParallelApplier::applyPlatformWorker):
(WebCore::FELightingNeonParallelApplier::applyPlatformParallel const):
* Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.h: Added.
* Source/WebCore/platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::createSoftwareApplier const):
* Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareArithmeticApplier.cpp:
* Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.cpp:
(WebCore::FELightingSoftwareApplier::applyPlatform const):
(WebCore::FELightingSoftwareApplier::applyPlatformGenericPaint): Deleted.
(WebCore::FELightingSoftwareApplier::applyPlatformGenericWorker): Deleted.
(WebCore::FELightingSoftwareApplier::applyPlatformGeneric): Deleted.
(WebCore::FELightingSoftwareApplier::applyPlatform): Deleted.
* Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h:
* Source/WebCore/platform/graphics/filters/software/FELightingSoftwareParallelApplier.cpp: Added.
(WebCore::FELightingSoftwareParallelApplier::applyPlatformPaint):
(WebCore::FELightingSoftwareParallelApplier::applyPlatformWorker):
(WebCore::FELightingSoftwareParallelApplier::applyPlatformParallel const):
* Source/WebCore/platform/graphics/filters/software/FELightingSoftwareParallelApplier.h: Added.

Canonical link: https://commits.webkit.org/272873@main
  • Loading branch information
shallawa authored and Said Abou-Hallawa committed Jan 11, 2024
1 parent 657d453 commit 46042d5
Show file tree
Hide file tree
Showing 11 changed files with 443 additions and 339 deletions.
3 changes: 2 additions & 1 deletion Source/WebCore/Sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,7 @@ platform/graphics/controls/ProgressBarPart.cpp
platform/graphics/controls/SliderTrackPart.cpp
platform/graphics/cpu/arm/filters/FEBlendNeonApplier.cpp
platform/graphics/cpu/arm/filters/FECompositeNeonArithmeticApplier.cpp
platform/graphics/cpu/arm/filters/FELightingNEON.cpp
platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp
platform/graphics/displaylists/DisplayList.cpp
platform/graphics/displaylists/DisplayListDrawingContext.cpp
platform/graphics/displaylists/DisplayListItem.cpp
Expand Down Expand Up @@ -2404,6 +2404,7 @@ platform/graphics/filters/software/FEFloodSoftwareApplier.cpp
platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp
platform/graphics/filters/software/FEImageSoftwareApplier.cpp
platform/graphics/filters/software/FELightingSoftwareApplier.cpp
platform/graphics/filters/software/FELightingSoftwareParallelApplier.cpp
platform/graphics/filters/software/FEMergeSoftwareApplier.cpp
platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp
platform/graphics/filters/software/FEOffsetSoftwareApplier.cpp
Expand Down
20 changes: 12 additions & 8 deletions Source/WebCore/WebCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12975,8 +12975,8 @@
72A13AC5274DE39E00E2A88E /* FEFloodSoftwareApplier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FEFloodSoftwareApplier.h; sourceTree = "<group>"; };
72A13AC6274DE3B700E2A88E /* FEGaussianBlurSoftwareApplier.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FEGaussianBlurSoftwareApplier.cpp; sourceTree = "<group>"; };
72A13AC7274DE3B700E2A88E /* FEGaussianBlurSoftwareApplier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FEGaussianBlurSoftwareApplier.h; sourceTree = "<group>"; };
72A13AC8274DE3D100E2A88E /* FELightingSoftwareApplier.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FELightingSoftwareApplier.cpp; sourceTree = "<group>"; };
72A13AC9274DE3D100E2A88E /* FELightingSoftwareApplier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FELightingSoftwareApplier.h; sourceTree = "<group>"; };
72A13AC8274DE3D100E2A88E /* FELightingSoftwareParallelApplier.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FELightingSoftwareParallelApplier.cpp; sourceTree = "<group>"; };
72A13AC9274DE3D100E2A88E /* FELightingSoftwareParallelApplier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FELightingSoftwareParallelApplier.h; sourceTree = "<group>"; };
72A13ACA274DE3E500E2A88E /* FEMergeSoftwareApplier.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FEMergeSoftwareApplier.cpp; sourceTree = "<group>"; };
72A13ACB274DE3E500E2A88E /* FEMergeSoftwareApplier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FEMergeSoftwareApplier.h; sourceTree = "<group>"; };
72A13ACC274DE43700E2A88E /* FEMorphologySoftwareApplier.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FEMorphologySoftwareApplier.cpp; sourceTree = "<group>"; };
Expand All @@ -12998,6 +12998,8 @@
72B22130295015D5002B5609 /* TextFieldMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextFieldMac.h; sourceTree = "<group>"; };
72B221472950FFEB002B5609 /* TextAreaMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = TextAreaMac.mm; sourceTree = "<group>"; };
72B221482950FFEB002B5609 /* TextAreaMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextAreaMac.h; sourceTree = "<group>"; };
72B4C13A2B4DF3A2008A72B9 /* FELightingSoftwareApplier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FELightingSoftwareApplier.h; sourceTree = "<group>"; };
72B4C13B2B4DF3A2008A72B9 /* FELightingSoftwareApplier.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FELightingSoftwareApplier.cpp; sourceTree = "<group>"; };
72B4EF74274E233300293C2F /* FEBlendSoftwareApplier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FEBlendSoftwareApplier.h; sourceTree = "<group>"; };
72B4EF75274E233400293C2F /* FEBlendSoftwareApplier.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FEBlendSoftwareApplier.cpp; sourceTree = "<group>"; };
72B4EF7C274EE37F00293C2F /* FilterImageVector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FilterImageVector.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -14594,8 +14596,8 @@
9332AB871653A97900D827EC /* FEBlendNeonApplier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FEBlendNeonApplier.h; sourceTree = "<group>"; };
9332AB881653A97900D827EC /* FECompositeNeonArithmeticApplier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FECompositeNeonArithmeticApplier.h; sourceTree = "<group>"; };
9332AB891653A97900D827EC /* FEGaussianBlurNEON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FEGaussianBlurNEON.h; sourceTree = "<group>"; };
9332AB8A1653A97900D827EC /* FELightingNEON.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FELightingNEON.cpp; sourceTree = "<group>"; };
9332AB8B1653A97900D827EC /* FELightingNEON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FELightingNEON.h; sourceTree = "<group>"; };
9332AB8A1653A97900D827EC /* FELightingNeonParallelApplier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FELightingNeonParallelApplier.cpp; sourceTree = "<group>"; };
9332AB8B1653A97900D827EC /* FELightingNeonParallelApplier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FELightingNeonParallelApplier.h; sourceTree = "<group>"; };
9332AB8C1653A97900D827EC /* NEONHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NEONHelpers.h; sourceTree = "<group>"; };
93354A3B0B24F8C9003F6DEA /* UIEventWithKeyState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEventWithKeyState.cpp; sourceTree = "<group>"; };
933A142B0B7D188600A53FFD /* TextEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextEvent.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -28090,8 +28092,10 @@
72A13AC7274DE3B700E2A88E /* FEGaussianBlurSoftwareApplier.h */,
72F7E751279CEE5C00D82D2D /* FEImageSoftwareApplier.cpp */,
72F7E752279CEE5C00D82D2D /* FEImageSoftwareApplier.h */,
72A13AC8274DE3D100E2A88E /* FELightingSoftwareApplier.cpp */,
72A13AC9274DE3D100E2A88E /* FELightingSoftwareApplier.h */,
72B4C13B2B4DF3A2008A72B9 /* FELightingSoftwareApplier.cpp */,
72B4C13A2B4DF3A2008A72B9 /* FELightingSoftwareApplier.h */,
72A13AC8274DE3D100E2A88E /* FELightingSoftwareParallelApplier.cpp */,
72A13AC9274DE3D100E2A88E /* FELightingSoftwareParallelApplier.h */,
72A13ACA274DE3E500E2A88E /* FEMergeSoftwareApplier.cpp */,
72A13ACB274DE3E500E2A88E /* FEMergeSoftwareApplier.h */,
72A13ACC274DE43700E2A88E /* FEMorphologySoftwareApplier.cpp */,
Expand Down Expand Up @@ -28814,8 +28818,8 @@
7241361F289863AC007B3FCD /* FECompositeNeonArithmeticApplier.cpp */,
9332AB881653A97900D827EC /* FECompositeNeonArithmeticApplier.h */,
9332AB891653A97900D827EC /* FEGaussianBlurNEON.h */,
9332AB8A1653A97900D827EC /* FELightingNEON.cpp */,
9332AB8B1653A97900D827EC /* FELightingNEON.h */,
9332AB8A1653A97900D827EC /* FELightingNeonParallelApplier.cpp */,
9332AB8B1653A97900D827EC /* FELightingNeonParallelApplier.h */,
9332AB8C1653A97900D827EC /* NEONHelpers.h */,
);
path = filters;
Expand Down
203 changes: 0 additions & 203 deletions Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h

This file was deleted.

Loading

0 comments on commit 46042d5

Please sign in to comment.