Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f076e1adb5518485b51b627b28a57fb96f6cc4e3
https://github.com/WebKit/WebKit/commit/f076e1adb5518485b51b627b28a57fb96f6cc4e3
Author: Said Abou-Hallawa <[email protected]>
Date: 2026-06-15 (Mon, 15 Jun 2026)
Changed paths:
M LayoutTests/svg/filters/feMorphology-radius-cases.svg
M Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/platform/graphics/PixelBuffer.h
M
Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp
M
Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.h
A
Source/WebCore/platform/graphics/filters/software/FilterEffectSoftwareParallelApplier.h
Log Message:
-----------
FEMorphologySoftwareApplier is not thread safe
https://bugs.webkit.org/show_bug.cgi?id=308910
rdar://168776587
Reviewed by Mike Wyrzykowski.
The software morphology applier relies on threading the calculations using
ParallelJobs. It splits the source image into vertical blocks and working on
each
block separately. All the jobs access the same source and the destination
PixelBuffer. The problem is the PixelBuffer is not thread safe.
To fix this issue, FEMorphologySoftwareApplier will create a source and a
destination PixelBuffers for each job. Before executing the parallel jobs, it
copies bytes from its source PixelBuffer to the jobs source PixelBuffers. After
the calculation finishes, FEMorphologySoftwareApplier will collect the results
from the destination PixelBuffers of the jobs to its destination PixelBuffer.
* LayoutTests/svg/filters/feMorphology-radius-cases.svg:
* Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/PixelBuffer.h:
*
Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:
(WebCore::FEMorphologySoftwareApplier::columnExtremum):
(WebCore::FEMorphologySoftwareApplier::applyPlatformGeneric):
(WebCore::FEMorphologySoftwareApplier::applyPlatformWorker):
(WebCore::FEMorphologySoftwareApplier::applyPlatform):
(WebCore::FEMorphologySoftwareApplier::apply const):
*
Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.h:
*
Source/WebCore/platform/graphics/filters/software/FilterEffectSoftwareParallelApplier.h:
Added.
(WebCore::applyPlatformParallel):
Originally-landed-as: 305413.516@rapid/safari-7624.2.5.110-branch
(e557102b0f77). rdar://176061452
Canonical link: https://commits.webkit.org/315239@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications