Add support for thread/WorkQueue QoS
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jun 2014 01:49:16 +0000 (01:49 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jun 2014 01:49:16 +0000 (01:49 +0000)
commitfca7831d7aa4a1b3af1cd84ec1c93c8a8f8444df
treededb32e3b96fc7ed9d550b4a1a4419704af31e8e
parente0698772776dc28801cf33e5ed2a5f2d24772899
Add support for thread/WorkQueue QoS
https://bugs.webkit.org/show_bug.cgi?id=130688

Reviewed by Anders Carlson & Simon Fraser.

Source/WebCore:
WebCore's ScrollingThread should be UserInteractive.

* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::threadCallback):
    - ScrollingThread should be UserInteractive

Source/WebKit2:
The EventDispatcher's WorkQueue should be UserInteractive.

* Platform/WorkQueue.cpp:
(WorkQueue::create):
    - pass QOS to constructor.
(WorkQueue::WorkQueue):
    - pass QOS to platformInitialize.
* Platform/WorkQueue.h:
    - added enum, arguments.
* Platform/efl/WorkQueueEfl.cpp:
(WorkQueue::platformInitialize):
    - has extra argument.
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::platformInitialize):
    - has extra argument.
* Platform/mac/WorkQueueMac.cpp:
(platformQOS):
    - map from enum to platform type.
(WorkQueue::platformInitialize):
    - set the QoS of the dispatch queue.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::EventDispatcher):
    - EventDispatcher's WorkQueue should be UserInteractive.
* config.h:
    - added HAVE_QOS_CLASSES

Source/WTF:
Add the ability to mark threads as UserInteractive.

* wtf/Threading.cpp:
(WTF::setCurrentThreadIsUserInteractive):
    - added method to set QoS of current thread to UserInteractive.
* wtf/Threading.h:
    - added declaration.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WTF/wtf/Threading.cpp
Source/WTF/wtf/Threading.h
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingThread.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/WorkQueue.cpp
Source/WebKit2/Platform/WorkQueue.h
Source/WebKit2/Platform/efl/WorkQueueEfl.cpp
Source/WebKit2/Platform/gtk/WorkQueueGtk.cpp
Source/WebKit2/Platform/mac/WorkQueueMac.cpp
Source/WebKit2/WebProcess/WebPage/EventDispatcher.cpp