[CoordinatedGraphics] VideoRenderRequestScheduler shouldn't dispatch to main thread...
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Dec 2015 09:48:34 +0000 (09:48 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Dec 2015 09:48:34 +0000 (09:48 +0000)
commit0a28dbdcce0be3a14272dc3dc6cf9a9ffe87787a
tree9c744f34ff6133838ef8c1425e67cd89df0a3016
parent669d946795df9e09078bb5149940ea988d5760b1
[CoordinatedGraphics] VideoRenderRequestScheduler shouldn't dispatch to main thread in threaded compositor
https://bugs.webkit.org/show_bug.cgi?id=152584

Reviewed by Carlos Garcia Campos.

The VideoRenderRequestScheduler class should only send the repaint-requested
signal dispatch to the main thread when not using the threaded compositor.
In case that is used (guarded via WTF_USE_COORDINATED_GRAPHICS_THREADED), the
signal dispatch can be done on the current thread (normally a GStreamer thread)
since the actual GL texture update will be then dispatched to the compositor
thread (unlike when gstreamer-gl is used, when the update can be done on the
very same thread).

When that is the case we don't need the RunLoop::Timer, Condition and the
video sink GRefPtr protector that are otherwise used by this class, so these
can just be guarded with the USE(...) flag.

* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(VideoRenderRequestScheduler::VideoRenderRequestScheduler):
(VideoRenderRequestScheduler::stop):
(VideoRenderRequestScheduler::requestRender):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp