[ThreadedCompositor] Use WTF::Condition together with WTF::Lock
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Aug 2015 03:32:12 +0000 (03:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Aug 2015 03:32:12 +0000 (03:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148493

Patch by Emanuele Aina <emanuele.aina@collabora.com> on 2015-08-26
Reviewed by Gyuyoung Kim.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
Replace ThreadCondition::signal() calls with Condition::notifyOne().
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
Replace ThreadCondition usage with Condition.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189010 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h

index 2845d9c..e6cd07f 100644 (file)
@@ -1,3 +1,15 @@
+2015-08-26  Emanuele Aina  <emanuele.aina@collabora.com>
+
+        [ThreadedCompositor] Use WTF::Condition together with WTF::Lock
+        https://bugs.webkit.org/show_bug.cgi?id=148493
+
+        Reviewed by Gyuyoung Kim.
+
+        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
+        Replace ThreadCondition::signal() calls with Condition::notifyOne().
+        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
+        Replace ThreadCondition usage with Condition.
+
 2015-08-26  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Fix crash due to animationDidEnd called on deallocated RemoteLayerTreeHost
index a6ae98a..a37248a 100644 (file)
@@ -312,7 +312,7 @@ void ThreadedCompositor::runCompositingThread()
         m_scene = adoptRef(new CoordinatedGraphicsScene(this));
         m_viewportController = std::make_unique<SimpleViewportController>(this);
 
-        m_initializeRunLoopCondition.signal();
+        m_initializeRunLoopCondition.notifyOne();
     }
 
     m_compositingRunLoop->runLoop().run();
@@ -324,7 +324,7 @@ void ThreadedCompositor::runCompositingThread()
         LockHolder locker(m_terminateRunLoopConditionMutex);
         m_compositingRunLoop = nullptr;
         m_context = nullptr;
-        m_terminateRunLoopCondition.signal();
+        m_terminateRunLoopCondition.notifyOne();
     }
 
     detachThread(m_threadIdentifier);
index 1d6c266..0e683dc 100644 (file)
@@ -33,6 +33,7 @@
 #include <WebCore/GLContext.h>
 #include <WebCore/IntSize.h>
 #include <WebCore/TransformationMatrix.h>
+#include <wtf/Condition.h>
 #include <wtf/FastMalloc.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/ThreadSafeRefCounted.h>
@@ -110,9 +111,9 @@ private:
     std::unique_ptr<CompositingRunLoop> m_compositingRunLoop;
 
     ThreadIdentifier m_threadIdentifier;
-    ThreadCondition m_initializeRunLoopCondition;
+    Condition m_initializeRunLoopCondition;
     Lock m_initializeRunLoopConditionMutex;
-    ThreadCondition m_terminateRunLoopCondition;
+    Condition m_terminateRunLoopCondition;
     Lock m_terminateRunLoopConditionMutex;
 };