[AsyncScrolling] Add generic ScrollingThread implementation
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Apr 2018 06:48:37 +0000 (06:48 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Apr 2018 06:48:37 +0000 (06:48 +0000)
commit671698b4cde2d12e47e4a454688e20af7f7c55c0
tree64faae5f486b3aba978fcd1ec5f330808cd4ad2a
parent35ef7f6ae8eecb1f006a674f40e922d2c5389c0f
[AsyncScrolling] Add generic ScrollingThread implementation
https://bugs.webkit.org/show_bug.cgi?id=184809

Reviewed by Yusuke Suzuki.

Add a generic ScrollingThread implementation that internally uses
RunLoop facilities to run the scrolling thread and dispatch
callbacks on that thread.

ScrollingThread::initializeRunLoop() retrieves address of the
thread-specific RunLoop and signals the Condition object.
ScrollingThread::wakeUpRunLoop() uses RunLoop::dispatch() to schedule
callback dispatches on the scrolling thread.

ScrollingThread::createThreadIfNeeded() mimics Cocoa implementation and
waits for the RunLoop address to be retrieved before continuing.

* SourcesGTK.txt: Add to build.
* SourcesWPE.txt: Ditto.
* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::createThreadIfNeeded):
* page/scrolling/ScrollingThread.h:
* page/scrolling/generic/ScrollingThreadGeneric.cpp: Added.
(WebCore::ScrollingThread::initializeRunLoop):
(WebCore::ScrollingThread::wakeUpRunLoop):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/SourcesGTK.txt
Source/WebCore/SourcesWPE.txt
Source/WebCore/page/scrolling/ScrollingThread.cpp
Source/WebCore/page/scrolling/ScrollingThread.h
Source/WebCore/page/scrolling/generic/ScrollingThreadGeneric.cpp [new file with mode: 0644]