Add TaskQueue and apply it into LayerTreeHostProxy. Both TaskQueue and MessageQueue are useful. TaskQueue can reduces codes about boilerplate message definition. MessageQueue can provide more functionality like remove. LayerTreeHostProxy dose not require special funcionality of MessageQueue, so TaskQueue can make LayerTreeHostProxy code more succinct.
Created attachment 128713 [details] patch
I will apply TaskQueue to RunLoop and etc.
Attachment 128713 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1 Source/JavaScriptCore/wtf/TaskQueue.h:38: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 128715 [details] patch v.2
Chrome defines Function<void()> to Closure, and defines Deque<Closure> to TaskQueue in message_loop.h in chromium project. I mimic that. I will bring some functionalities from chrome to WebKit when I need them. http://dev.chromium.org/developers/design-documents/threading
I'm OK with the changes to LayerTreeHostProxy, but I don't get to review additions to WTF.
Thanks, Rosenthal. I think it is hard to persuade to patch TaskQueue. I postpone it next.
Created attachment 128851 [details] patch v.3
I focus on only LayerTreeHostProxy without unreasonable invasion to WTF. I understand only one thread using LayerTreeHostProxy, so I do not use Mutex.
Created attachment 128853 [details] patch v.4
Comment on attachment 128853 [details] patch v.4 View in context: https://bugs.webkit.org/attachment.cgi?id=128853&action=review Awesome! Some touch ups and we're good. > Source/WebKit2/ChangeLog:8 > + It is succinct to collect tasks using Functional because of reducing codes about > + boilerplate message definition. Please reword changelog (just an English touch-up): Use Functional instead of a MessageQueue for messages to the LayerTreeHostProxy renderer. This makes a lot of the broilerplate code for message-passing unnecessary, and results in a much more succinct implementation. > Source/WebKit2/UIProcess/LayerTreeHostProxy.h:92 > + Vector<Function<void()> > m_functionQueue; m_functionQueue -> m_renderQueue
Created attachment 128932 [details] patch v.5 Thanks for kind review. :)
The commit-queue encountered the following flaky tests while processing attachment 128932 [details]: css3/filters/effect-contrast-hw.html bug 79618 (author: cmarrin@apple.com) The commit-queue is continuing to process your patch.
Comment on attachment 128932 [details] patch v.5 Clearing flags on attachment: 128932 Committed r108951: <http://trac.webkit.org/changeset/108951>
All reviewed patches have been landed. Closing bug.