[GTK] Video playback doesn't work properly with accelerated compositing disabled
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Oct 2016 15:00:09 +0000 (15:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Oct 2016 15:00:09 +0000 (15:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=163386

Patch by Miguel Gomez <magomez@igalia.com> on 2016-10-13
Reviewed by Carlos Garcia Campos.

Trigger a repaint of the player when a new frame arrives and accelerated compositing is disabled.

Covered by existent tests.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp

index a4f99d9..d396f3b 100644 (file)
@@ -1,3 +1,17 @@
+2016-10-13  Miguel Gomez  <magomez@igalia.com>
+
+        [GTK] Video playback doesn't work properly with accelerated compositing disabled
+        https://bugs.webkit.org/show_bug.cgi?id=163386
+
+        Reviewed by Carlos Garcia Campos.
+
+        Trigger a repaint of the player when a new frame arrives and accelerated compositing is disabled.
+
+        Covered by existent tests.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
+
 2016-10-13  Antti Koivisto  <antti@apple.com>
 
         Share inline stylesheets between shadow trees
index 18a74b1..1fe2a63 100644 (file)
@@ -596,14 +596,21 @@ void MediaPlayerPrivateGStreamerBase::triggerRepaint(GstSample* sample)
 
 #if USE(COORDINATED_GRAPHICS_THREADED)
 #if USE(GSTREAMER_GL)
-    pushTextureToCompositor();
+    if (m_player->client().mediaPlayerRenderingCanBeAccelerated(m_player))
+        pushTextureToCompositor();
+    else {
+        LockHolder locker(m_drawMutex);
+        m_drawTimer.startOneShot(0);
+        m_drawCondition.wait(m_drawMutex);
+    }
 #else
-    {
+    if (m_player->client().mediaPlayerRenderingCanBeAccelerated(m_player)) {
         LockHolder lock(m_drawMutex);
         if (!m_platformLayerProxy->scheduleUpdateOnCompositorThread([this] { this->pushTextureToCompositor(); }))
             return;
         m_drawCondition.wait(m_drawMutex);
-    }
+    } else
+        repaint();
 #endif
     return;
 #else