Bug 148493 - [ThreadedCompositor] Use WTF::Condition together with WTF::Lock
Summary: [ThreadedCompositor] Use WTF::Condition together with WTF::Lock
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 147841
  Show dependency treegraph
 
Reported: 2015-08-26 15:15 PDT by Emanuele Aina
Modified: 2015-08-26 20:32 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.09 KB, patch)
2015-08-26 15:18 PDT, Emanuele Aina
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuele Aina 2015-08-26 15:15:17 PDT
The recent switch to WTF::Lock results in build failures with ENABLE_THREADED_COMPOSITOR=ON:

../../Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: In member function ‘void WebKit::ThreadedCompositor::createCompositingThread()’:
../../Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:301:72: error: no matching function for call to ‘WTF::ThreadCondition::wait(WTF::Lock&)’
     m_initializeRunLoopCondition.wait(m_initializeRunLoopConditionMutex);
                                                                        ^
../../Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:301:72: note: candidate is:
In file included from ../../Source/WTF/wtf/Threading.h:44:0,
                 from ../../Source/WebCore/platform/Timer.h:32,
                 from ../../Source/WebCore/platform/graphics/FontCache.h:34,
                 from ../../Source/WebCore/platform/graphics/freetype/FontPlatformData.h:29,
                 from ../../Source/WebCore/platform/graphics/FontPlatformData.h:27,
                 from ../../Source/WebCore/platform/graphics/Font.h:30,
                 from ../../Source/WebCore/platform/graphics/FontCascade.h:29,
                 from ../../Source/WebCore/platform/graphics/GraphicsContext.h:33,
                 from DerivedSources/ForwardingHeaders/WebCore/GraphicsContext.h:1,
                 from ../../Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:27,
                 from ../../Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:31,
                 from ../../Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:29:
../../Source/WTF/wtf/ThreadingPrimitives.h:97:10: note: void WTF::ThreadCondition::wait(WTF::Mutex&)
     WTF_EXPORT_PRIVATE void wait(Mutex& mutex);
          ^
../../Source/WTF/wtf/ThreadingPrimitives.h:97:10: note:   no known conversion for argument 1 from ‘WTF::Lock’ to ‘WTF::Mutex&’
../../Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: In member function ‘void WebKit::ThreadedCompositor::terminateCompositingThread()’:
../../Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:340:70: error: no matching function for call to ‘WTF::ThreadCondition::wait(WTF::Lock&)’
     m_terminateRunLoopCondition.wait(m_terminateRunLoopConditionMutex);
Comment 1 Emanuele Aina 2015-08-26 15:18:12 PDT
Created attachment 259983 [details]
Patch
Comment 2 Gyuyoung Kim 2015-08-26 19:13:56 PDT
Comment on attachment 259983 [details]
Patch

LGTM based on recent changes (r188323).
Comment 3 Filip Pizlo 2015-08-26 19:43:18 PDT
LGTM!
Comment 4 WebKit Commit Bot 2015-08-26 20:32:28 PDT
Comment on attachment 259983 [details]
Patch

Clearing flags on attachment: 259983

Committed r189010: <http://trac.webkit.org/changeset/189010>
Comment 5 WebKit Commit Bot 2015-08-26 20:32:32 PDT
All reviewed patches have been landed.  Closing bug.