2011-04-26 Gabor Loki <loki@webkit.org>
authorloki@webkit.org <loki@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Apr 2011 14:40:47 +0000 (14:40 +0000)
committerloki@webkit.org <loki@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Apr 2011 14:40:47 +0000 (14:40 +0000)
commit4d3c72e4a838374817c0aa95e646673f24e852ae
tree99e1f4a478ca3eba99c469fd5cfd7ede02faeb63
parentb9cdeda936a8e631acb2712f5ac1189eea67f2cb
2011-04-26  Gabor Loki  <loki@webkit.org>

        Reviewed by Csaba Osztrogon√°c.

        Speeding up SVG filters with multicore (SMP) support
        https://bugs.webkit.org/show_bug.cgi?id=43903

        Some SVG filters execute a huge number of pixel manipulations, which
        cannot be sped up by graphics accelerators, since their algorithm is
        too complex. Using the power of Symmetric Multi Processing (SMP) we
        can split up a task to smaller (data independent) tasks, which can be
        executed independently.

        The ParallelJobs framework provides a simple way for distributed
        programming. The framework is based on WebKit's threading infrastructure,
        Open Multi-Processing's (OpenMP) API, and libdispatch API.

        * GNUmakefile.list.am:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * wtf/CMakeLists.txt:
        * wtf/ParallelJobs.h: Added.
        (WTF::ParallelJobs::ParallelJobs):
        (WTF::ParallelJobs::numberOfJobs):
        (WTF::ParallelJobs::parameterForJob):
        (WTF::ParallelJobs::executeJobs):
        * wtf/ParallelJobsGeneric.cpp: Added.
        (WTF::ParallelEnvironment::ThreadPrivate::tryLockFor):
        (WTF::ParallelEnvironment::ThreadPrivate::executeJob):
        (WTF::ParallelEnvironment::ThreadPrivate::waitForFinish):
        (WTF::ParallelEnvironment::ThreadPrivate::workerThread):
        * wtf/ParallelJobsGeneric.h: Added.
        (WTF::ParallelEnvironment::ParallelEnvironment):
        (WTF::ParallelEnvironment::numberOfJobs):
        (WTF::ParallelEnvironment::parameterForJob):
        (WTF::ParallelEnvironment::executeJobs):
        (WTF::ParallelEnvironment::ThreadPrivate::ThreadPrivate):
        (WTF::ParallelEnvironment::ThreadPrivate::create):
        * wtf/ParallelJobsLibdispatch.h: Added.
        (WTF::ParallelEnvironment::ParallelEnvironment):
        (WTF::ParallelEnvironment::numberOfJobs):
        (WTF::ParallelEnvironment::parameterForJob):
        (WTF::ParallelEnvironment::executeJobs):
        * wtf/ParallelJobsOpenMP.h: Added.
        (WTF::ParallelEnvironment::ParallelEnvironment):
        (WTF::ParallelEnvironment::numberOfJobs):
        (WTF::ParallelEnvironment::parameterForJob):
        (WTF::ParallelEnvironment::executeJobs):
        * wtf/Platform.h:
        * wtf/wtf.pri:
2011-04-26  Gabor Loki  <loki@webkit.org>

        Reviewed by Csaba Osztrogon√°c.

        Speeding up SVG filters with multicore (SMP) support
        https://bugs.webkit.org/show_bug.cgi?id=43903

        Some SVG filters execute a huge number of pixel manipulations, which
        cannot be sped up by graphics accelerators, since their algorithm is
        too complex. Using the power of Symmetric Multi Processing (SMP) we
        can split up a task to smaller (data independent) tasks, which can be
        executed independently.

        The ParallelJobs framework provides a simple way for distributed
        programming. The framework is based on WebKit's threading infrastructure,
        Open Multi-Processing's (OpenMP) API, and libdispatch API.

        * ForwardingHeaders/wtf/ParallelJobs.h: Added.
        * platform/graphics/filters/FETurbulence.cpp:
        (WebCore::FETurbulence::PaintingData::PaintingData):
        (WebCore::FETurbulence::noise2D):
        (WebCore::FETurbulence::calculateTurbulenceValueForPoint):
        (WebCore::FETurbulence::fillRegion):
        (WebCore::FETurbulence::fillRegionWorker):
        (WebCore::FETurbulence::apply):
        * platform/graphics/filters/FETurbulence.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.list.am
Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/wtf/CMakeLists.txt
Source/JavaScriptCore/wtf/ParallelJobs.h [new file with mode: 0644]
Source/JavaScriptCore/wtf/ParallelJobsGeneric.cpp [new file with mode: 0644]
Source/JavaScriptCore/wtf/ParallelJobsGeneric.h [new file with mode: 0644]
Source/JavaScriptCore/wtf/ParallelJobsLibdispatch.h [new file with mode: 0644]
Source/JavaScriptCore/wtf/ParallelJobsOpenMP.h [new file with mode: 0644]
Source/JavaScriptCore/wtf/Platform.h
Source/JavaScriptCore/wtf/wtf.pri
Source/WebCore/ChangeLog
Source/WebCore/ForwardingHeaders/wtf/ParallelJobs.h [new file with mode: 0644]
Source/WebCore/platform/graphics/filters/FETurbulence.cpp
Source/WebCore/platform/graphics/filters/FETurbulence.h