Title: [254682] trunk
Revision
254682
Author
[email protected]
Date
2020-01-16 07:57:34 -0800 (Thu, 16 Jan 2020)

Log Message

[GStreamer][WPE] Client-side video rendering support
https://bugs.webkit.org/show_bug.cgi?id=206289

Patch by Philippe Normand <[email protected]> on 2020-01-16
Reviewed by Xabier Rodriguez-Calvar.

.:

Add a new compile-time option to enable client-side video
rendering support. With this feature enabled the UIProcess will be
in charge of positioning and rendering video surfaces, thanks to
the WPEBackend-FDO video-plane-display-dmabuf protocol.

* Source/cmake/GStreamerDefinitions.cmake: Add
USE_WPE_VIDEO_PLANE_DISPLAY_DMABUF CMake option, disabled by
default.
* Source/cmake/GStreamerDependencies.cmake: This new option
depends on GStreamer-GL.
* Source/cmake/OptionsWPE.cmake: It depends also on the presence
of the WPEBackend-FDO library.

Source/WebCore:

With the WPE_VIDEO_PLANE_DISPLAY_DMABUF option enabled the player
will render a transparent placeholder for videos, using the
HolePunch code path. Then it is up to the UIProcess to listen to
the incoming video dmabufs and render them. This allows the
browser to use Wayland protocols related with Protection (HDCP,
for instance).

* PlatformWPE.cmake:
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
(WTF::refGPtr<GstEGLImage>):
(WTF::derefGPtr<GstEGLImage>):
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::GstVideoFrameHolder::handoffVideoDmaBuf):
(WebCore::GstVideoFrameHolder::waitForCPUSync):
(WebCore::GstVideoFrameHolder::updateTexture):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
(WebCore::GStreamerDMABufHolePunchClient::GStreamerDMABufHolePunchClient):
(WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

Tools:

* wpe/jhbuild.modules: Bump to libwpe and wpebackend-fdo git
snapshots, until 1.5.x releases are published.

Modified Paths

Diff

Modified: trunk/ChangeLog (254681 => 254682)


--- trunk/ChangeLog	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/ChangeLog	2020-01-16 15:57:34 UTC (rev 254682)
@@ -1,3 +1,23 @@
+2020-01-16  Philippe Normand  <[email protected]>
+
+        [GStreamer][WPE] Client-side video rendering support
+        https://bugs.webkit.org/show_bug.cgi?id=206289
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Add a new compile-time option to enable client-side video
+        rendering support. With this feature enabled the UIProcess will be
+        in charge of positioning and rendering video surfaces, thanks to
+        the WPEBackend-FDO video-plane-display-dmabuf protocol.
+
+        * Source/cmake/GStreamerDefinitions.cmake: Add
+        USE_WPE_VIDEO_PLANE_DISPLAY_DMABUF CMake option, disabled by
+        default.
+        * Source/cmake/GStreamerDependencies.cmake: This new option
+        depends on GStreamer-GL.
+        * Source/cmake/OptionsWPE.cmake: It depends also on the presence
+        of the WPEBackend-FDO library.
+
 2020-01-16  Per Arne Vollan  <[email protected]>
 
         [Win] Fix AppleWin build

Modified: trunk/Source/WebCore/ChangeLog (254681 => 254682)


--- trunk/Source/WebCore/ChangeLog	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/WebCore/ChangeLog	2020-01-16 15:57:34 UTC (rev 254682)
@@ -1,3 +1,35 @@
+2020-01-16  Philippe Normand  <[email protected]>
+
+        [GStreamer][WPE] Client-side video rendering support
+        https://bugs.webkit.org/show_bug.cgi?id=206289
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        With the WPE_VIDEO_PLANE_DISPLAY_DMABUF option enabled the player
+        will render a transparent placeholder for videos, using the
+        HolePunch code path. Then it is up to the UIProcess to listen to
+        the incoming video dmabufs and render them. This allows the
+        browser to use Wayland protocols related with Protection (HDCP,
+        for instance).
+
+        * PlatformWPE.cmake:
+        * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
+        (WTF::adoptGRef):
+        (WTF::refGPtr<GstEGLImage>):
+        (WTF::derefGPtr<GstEGLImage>):
+        * platform/graphics/gstreamer/GRefPtrGStreamer.h:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
+        (WebCore::GstVideoFrameHolder::handoffVideoDmaBuf):
+        (WebCore::GstVideoFrameHolder::waitForCPUSync):
+        (WebCore::GstVideoFrameHolder::updateTexture):
+        (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
+        (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
+        (WebCore::MediaPlayerPrivateGStreamer::didEnd):
+        (WebCore::GStreamerDMABufHolePunchClient::GStreamerDMABufHolePunchClient):
+        (WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
+
 2020-01-16  Per Arne Vollan  <[email protected]>
 
         [Win] Fix AppleWin build

Modified: trunk/Source/WebCore/PlatformWPE.cmake (254681 => 254682)


--- trunk/Source/WebCore/PlatformWPE.cmake	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/WebCore/PlatformWPE.cmake	2020-01-16 15:57:34 UTC (rev 254682)
@@ -57,6 +57,7 @@
     ${LIBTASN1_LIBRARIES}
     ${UPOWERGLIB_LIBRARIES}
     ${WPE_LIBRARIES}
+    ${WPEBACKEND_FDO_LIBRARIES}
 )
 
 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
@@ -66,4 +67,5 @@
     ${LIBTASN1_INCLUDE_DIRS}
     ${UPOWERGLIB_INCLUDE_DIRS}
     ${WPE_INCLUDE_DIRS}
+    ${WPEBACKEND_FDO_INCLUDE_DIRS}
 )

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp (254681 => 254682)


--- trunk/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp	2020-01-16 15:57:34 UTC (rev 254682)
@@ -23,6 +23,10 @@
 #if USE(GSTREAMER)
 #include <gst/gst.h>
 
+#if USE(GSTREAMER_GL)
+#include <gst/gl/egl/gsteglimage.h>
+#endif
+
 namespace WTF {
 
 template <> GRefPtr<GstElement> adoptGRef(GstElement* ptr)
@@ -504,6 +508,24 @@
         gst_object_unref(GST_OBJECT(ptr));
 }
 
+template <> GRefPtr<GstEGLImage> adoptGRef(GstEGLImage* ptr)
+{
+    return GRefPtr<GstEGLImage>(ptr, GRefPtrAdopt);
+}
+
+template <> GstEGLImage* refGPtr<GstEGLImage>(GstEGLImage* ptr)
+{
+    if (ptr)
+        gst_egl_image_ref(ptr);
+    return ptr;
+}
+
+template <> void derefGPtr<GstEGLImage>(GstEGLImage* ptr)
+{
+    if (ptr)
+        gst_egl_image_unref(ptr);
+}
+
 #endif // USE(GSTREAMER_GL)
 
 } // namespace WTF

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h (254681 => 254682)


--- trunk/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h	2020-01-16 15:57:34 UTC (rev 254682)
@@ -30,6 +30,7 @@
 #if USE(GSTREAMER_GL)
 typedef struct _GstGLDisplay GstGLDisplay;
 typedef struct _GstGLContext GstGLContext;
+typedef struct _GstEGLImage GstEGLImage;
 #endif
 
 namespace WTF {
@@ -131,6 +132,10 @@
 template<> GRefPtr<GstGLContext> adoptGRef(GstGLContext* ptr);
 template<> GstGLContext* refGPtr<GstGLContext>(GstGLContext* ptr);
 template<> void derefGPtr<GstGLContext>(GstGLContext* ptr);
+
+template<> GRefPtr<GstEGLImage> adoptGRef(GstEGLImage* ptr);
+template<> GstEGLImage* refGPtr<GstEGLImage>(GstEGLImage* ptr);
+template<> void derefGPtr<GstEGLImage>(GstEGLImage* ptr);
 #endif
 
 } // namespace WTF

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h (254681 => 254682)


--- trunk/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GUniquePtrGStreamer.h	2020-01-16 15:57:34 UTC (rev 254682)
@@ -17,8 +17,8 @@
  *  Boston, MA 02110-1301, USA.
  */
 
-#ifndef GUniquePtrGStreamer_h
-#define GUniquePtrGStreamer_h
+#pragma once
+
 #if USE(GSTREAMER)
 
 #include <gst/audio/audio.h>
@@ -30,6 +30,10 @@
 #include <gst/video/video.h>
 #include <wtf/glib/GUniquePtr.h>
 
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+#include <wpe/extensions/video-plane-display-dmabuf.h>
+#endif
+
 namespace WTF {
 
 WTF_DEFINE_GPTR_DELETER(GstStructure, gst_structure_free)
@@ -41,7 +45,11 @@
 WTF_DEFINE_GPTR_DELETER(GstVideoConverter, gst_video_converter_free)
 WTF_DEFINE_GPTR_DELETER(GstAudioConverter, gst_audio_converter_free)
 
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+WTF_DEFINE_GPTR_DELETER(struct wpe_video_plane_display_dmabuf_source, wpe_video_plane_display_dmabuf_source_destroy)
+#endif
+
 }
 
 #endif // USE(GSTREAMER)
-#endif
+

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (254681 => 254682)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2020-01-16 15:57:34 UTC (rev 254682)
@@ -140,6 +140,12 @@
 #endif
 #endif // USE(TEXTURE_MAPPER_GL)
 
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+#include "PlatformDisplayLibWPE.h"
+#include <gst/gl/egl/gsteglimage.h>
+#include <wpe/extensions/video-plane-display-dmabuf.h>
+#endif
+
 GST_DEBUG_CATEGORY(webkit_media_player_debug);
 #define GST_CAT_DEFAULT webkit_media_player_debug
 
@@ -189,7 +195,7 @@
         m_size = IntSize(GST_VIDEO_INFO_WIDTH(&videoInfo), GST_VIDEO_INFO_HEIGHT(&videoInfo));
         m_hasAlphaChannel = GST_VIDEO_INFO_HAS_ALPHA(&videoInfo);
         m_buffer = gst_sample_get_buffer(sample);
-        if (UNLIKELY(!GST_IS_BUFFER(m_buffer)))
+        if (UNLIKELY(!GST_IS_BUFFER(m_buffer.get())))
             return;
 
 #if USE(GSTREAMER_GL)
@@ -196,7 +202,7 @@
         m_flags = flags | (m_hasAlphaChannel ? TextureMapperGL::ShouldBlend : 0);
 
         if (gstGLEnabled) {
-            m_isMapped = gst_video_frame_map(&m_videoFrame, &videoInfo, m_buffer, static_cast<GstMapFlags>(GST_MAP_READ | GST_MAP_GL));
+            m_isMapped = gst_video_frame_map(&m_videoFrame, &videoInfo, m_buffer.get(), static_cast<GstMapFlags>(GST_MAP_READ | GST_MAP_GL));
             if (m_isMapped) {
                 m_textureID = *reinterpret_cast<GLuint*>(m_videoFrame.data[0]);
                 m_hasMappedTextures = true;
@@ -208,8 +214,22 @@
 #endif // USE(GSTREAMER_GL)
 
         {
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+            GstMemory* memory = gst_buffer_peek_memory(m_buffer.get(), 0);
+            if (gst_is_gl_memory(memory)) {
+                GstGLMemory* glMemory = GST_GL_MEMORY_CAST(memory);
+                GRefPtr<GstEGLImage> eglImage = adoptGRef(gst_egl_image_from_texture(GST_GL_BASE_MEMORY_CAST(memory)->context, glMemory, nullptr));
+                gsize offset;
+                if (eglImage && gst_egl_image_export_dmabuf(eglImage.get(), &m_dmabufFD, &m_dmabufStride, &offset))
+                    return;
+            }
+            static std::once_flag onceFlag;
+            std::call_once(onceFlag, [] {
+                GST_WARNING("Texture export to DMABuf failed, falling back to internal rendering");
+            });
+#endif
             m_textureID = 0;
-            m_isMapped = gst_video_frame_map(&m_videoFrame, &videoInfo, m_buffer, GST_MAP_READ);
+            m_isMapped = gst_video_frame_map(&m_videoFrame, &videoInfo, m_buffer.get(), GST_MAP_READ);
             if (m_isMapped) {
                 // Right now the TextureMapper only supports chromas with one plane
                 ASSERT(GST_VIDEO_INFO_N_PLANES(&videoInfo) == 1);
@@ -225,12 +245,30 @@
         gst_video_frame_unmap(&m_videoFrame);
     }
 
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+    void handoffVideoDmaBuf(struct wpe_video_plane_display_dmabuf_source* videoPlaneDisplayDmaBufSource, const IntRect& rect)
+    {
+        if (m_dmabufFD <= 0)
+            return;
+
+        if (m_dmabufStride == -1)
+            m_dmabufStride = GST_VIDEO_INFO_PLANE_STRIDE(&m_videoFrame.info, 0);
+
+        wpe_video_plane_display_dmabuf_source_update(videoPlaneDisplayDmaBufSource, m_dmabufFD, rect.x(), rect.y(), m_size.width(), m_size.height(), m_dmabufStride, [](void* data) {
+            gst_buffer_unref(GST_BUFFER_CAST(data));
+        }, gst_buffer_ref(m_buffer.get()));
+
+        close(m_dmabufFD);
+        m_dmabufFD = 0;
+    }
+#endif
+
 #if USE(GSTREAMER_GL)
     virtual void waitForCPUSync()
     {
-        GstGLSyncMeta* meta = gst_buffer_get_gl_sync_meta(m_buffer);
+        GstGLSyncMeta* meta = gst_buffer_get_gl_sync_meta(m_buffer.get());
         if (meta) {
-            GstMemory* mem = gst_buffer_peek_memory(m_buffer, 0);
+            GstMemory* mem = gst_buffer_peek_memory(m_buffer.get(), 0);
             GstGLContext* context = ((GstGLBaseMemory*)mem)->context;
             gst_gl_sync_meta_wait_cpu(meta, context);
         }
@@ -248,7 +286,7 @@
     {
         ASSERT(!m_textureID);
         GstVideoGLTextureUploadMeta* meta;
-        if (m_buffer && (meta = gst_buffer_get_video_gl_texture_upload_meta(m_buffer))) {
+        if (m_buffer && (meta = gst_buffer_get_video_gl_texture_upload_meta(m_buffer.get()))) {
             if (meta->n_textures == 1) { // BRGx & BGRA formats use only one texture.
                 guint ids[4] = { texture.id(), 0, 0, 0 };
 
@@ -324,7 +362,7 @@
     }
 
 private:
-    GstBuffer* m_buffer;
+    GRefPtr<GstBuffer> m_buffer;
     GstVideoFrame m_videoFrame { };
     IntSize m_size;
     bool m_hasAlphaChannel;
@@ -333,6 +371,10 @@
     GLuint m_textureID { 0 };
     bool m_isMapped { false };
     bool m_hasMappedTextures { false };
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+    int m_dmabufFD { 0 };
+    int m_dmabufStride { 0 };
+#endif
 };
 #endif
 
@@ -370,6 +412,12 @@
     m_readyTimerHandler.setPriority(G_PRIORITY_DEFAULT_IDLE);
 #endif
     m_isPlayerShuttingDown.store(false);
+
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+    auto& sharedDisplay = PlatformDisplay::sharedDisplay();
+    if (is<PlatformDisplayLibWPE>(sharedDisplay))
+        m_wpeVideoPlaneDisplayDmaBuf.reset(wpe_video_plane_display_dmabuf_source_create(downcast<PlatformDisplayLibWPE>(sharedDisplay).backend()));
+#endif
 }
 
 MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer()
@@ -2820,6 +2868,10 @@
         m_isPaused = true;
         changePipelineState(GST_STATE_READY);
         m_didDownloadFinish = false;
+
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+        wpe_video_plane_display_dmabuf_source_end_of_stream(m_wpeVideoPlaneDisplayDmaBuf.get());
+#endif
     }
     timeChanged();
 }
@@ -3067,6 +3119,23 @@
 }
 #endif
 
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+class GStreamerDMABufHolePunchClient : public TextureMapperPlatformLayerBuffer::HolePunchClient {
+public:
+    GStreamerDMABufHolePunchClient(std::unique_ptr<GstVideoFrameHolder>&& frameHolder, struct wpe_video_plane_display_dmabuf_source* videoPlaneDisplayDmaBufSource)
+        : m_frameHolder(WTFMove(frameHolder))
+        , m_wpeVideoPlaneDisplayDmaBuf(videoPlaneDisplayDmaBufSource) { };
+    void setVideoRectangle(const IntRect& rect) final
+    {
+        if (m_wpeVideoPlaneDisplayDmaBuf)
+            m_frameHolder->handoffVideoDmaBuf(m_wpeVideoPlaneDisplayDmaBuf, rect);
+    }
+private:
+    std::unique_ptr<GstVideoFrameHolder> m_frameHolder;
+    struct wpe_video_plane_display_dmabuf_source* m_wpeVideoPlaneDisplayDmaBuf;
+};
+#endif // USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+
 void MediaPlayerPrivateGStreamer::pushTextureToCompositor()
 {
     auto sampleLocker = holdLock(m_sampleMutex);
@@ -3073,6 +3142,8 @@
     if (!GST_IS_SAMPLE(m_sample.get()))
         return;
 
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+
     auto proxyOperation =
         [this](TextureMapperPlatformLayerProxy& proxy)
         {
@@ -3081,6 +3152,22 @@
             if (!proxy.isActive())
                 return;
 
+            std::unique_ptr<GstVideoFrameHolder> frameHolder = makeUnique<GstVideoFrameHolder>(m_sample.get(), m_videoDecoderPlatform, m_textureMapperFlags, false);
+
+            std::unique_ptr<TextureMapperPlatformLayerBuffer> layerBuffer = makeUnique<TextureMapperPlatformLayerBuffer>(0, m_size, TextureMapperGL::ShouldNotBlend, GL_DONT_CARE);
+            auto holePunchClient = makeUnique<GStreamerDMABufHolePunchClient>(WTFMove(frameHolder), m_wpeVideoPlaneDisplayDmaBuf.get());
+            layerBuffer->setHolePunchClient(WTFMove(holePunchClient));
+            proxy.pushNextBuffer(WTFMove(layerBuffer));
+        };
+#else
+    auto proxyOperation =
+        [this](TextureMapperPlatformLayerProxy& proxy)
+        {
+            LockHolder holder(proxy.lock());
+
+            if (!proxy.isActive())
+                return;
+
             std::unique_ptr<GstVideoFrameHolder> frameHolder = makeUnique<GstVideoFrameHolder>(m_sample.get(), m_videoDecoderPlatform, m_textureMapperFlags, !m_isUsingFallbackVideoSink);
 
             std::unique_ptr<TextureMapperPlatformLayerBuffer> layerBuffer;
@@ -3101,6 +3188,7 @@
             }
             proxy.pushNextBuffer(WTFMove(layerBuffer));
         };
+#endif // USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
 
 #if USE(NICOSIA)
     proxyOperation(downcast<Nicosia::ContentLayerTextureMapperImpl>(m_nicosiaLayer->impl()).proxy());

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h (254681 => 254682)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2020-01-16 15:57:34 UTC (rev 254682)
@@ -81,6 +81,10 @@
 typedef struct _GstGLContext GstGLContext;
 typedef struct _GstGLDisplay GstGLDisplay;
 
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+struct wpe_video_plane_display_dmabuf_source;
+#endif
+
 namespace WebCore {
 
 class BitmapTextureGL;
@@ -517,6 +521,11 @@
     Optional<bool> m_hasTaintedOrigin { WTF::nullopt };
 
     GRefPtr<GstElement> m_fpsSink { nullptr };
+
+private:
+#if USE(WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+    GUniquePtr<struct wpe_video_plane_display_dmabuf_source> m_wpeVideoPlaneDisplayDmaBuf;
+#endif
 };
 
 }

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp (254681 => 254682)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp	2020-01-16 15:57:34 UTC (rev 254682)
@@ -110,7 +110,7 @@
     return !!m_targetLayer && !!m_compositor;
 }
 
-void TextureMapperPlatformLayerProxy::pushNextBuffer(std::unique_ptr<TextureMapperPlatformLayerBuffer> newBuffer)
+void TextureMapperPlatformLayerProxy::pushNextBuffer(std::unique_ptr<TextureMapperPlatformLayerBuffer>&& newBuffer)
 {
     ASSERT(m_lock.isHeld());
 #if USE(ANGLE)

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h (254681 => 254682)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h	2020-01-16 15:57:34 UTC (rev 254682)
@@ -62,7 +62,7 @@
     // aquire / release the lock explicitly to use below methods.
     Lock& lock() { return m_lock; }
     std::unique_ptr<TextureMapperPlatformLayerBuffer> getAvailableBuffer(const IntSize&, GLint internalFormat);
-    void pushNextBuffer(std::unique_ptr<TextureMapperPlatformLayerBuffer>);
+    void pushNextBuffer(std::unique_ptr<TextureMapperPlatformLayerBuffer>&&);
     bool isActive();
 
     WEBCORE_EXPORT void activateOnCompositingThread(Compositor*, TextureMapperLayer*);

Modified: trunk/Source/cmake/GStreamerDefinitions.cmake (254681 => 254682)


--- trunk/Source/cmake/GStreamerDefinitions.cmake	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/cmake/GStreamerDefinitions.cmake	2020-01-16 15:57:34 UTC (rev 254682)
@@ -5,3 +5,4 @@
 
 WEBKIT_OPTION_DEFINE(USE_GSTREAMER_GL "Whether to enable support for GStreamer GL" PRIVATE ON)
 WEBKIT_OPTION_DEFINE(USE_GSTREAMER_MPEGTS "Whether to enable support for MPEG-TS" PRIVATE OFF)
+WEBKIT_OPTION_DEFINE(USE_WPE_VIDEO_PLANE_DISPLAY_DMABUF "Whether to enable support for client-side video rendering" PRIVATE OFF)

Modified: trunk/Source/cmake/GStreamerDependencies.cmake (254681 => 254682)


--- trunk/Source/cmake/GStreamerDependencies.cmake	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/cmake/GStreamerDependencies.cmake	2020-01-16 15:57:34 UTC (rev 254682)
@@ -3,3 +3,4 @@
 endif ()
 WEBKIT_OPTION_DEPEND(USE_GSTREAMER_GL ENABLE_VIDEO)
 WEBKIT_OPTION_DEPEND(USE_GSTREAMER_MPEGTS ENABLE_VIDEO)
+WEBKIT_OPTION_DEPEND(USE_WPE_VIDEO_PLANE_DISPLAY_DMABUF USE_GSTREAMER_GL)

Modified: trunk/Source/cmake/OptionsWPE.cmake (254681 => 254682)


--- trunk/Source/cmake/OptionsWPE.cmake	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Source/cmake/OptionsWPE.cmake	2020-01-16 15:57:34 UTC (rev 254682)
@@ -166,10 +166,12 @@
 if (ENABLE_WPE_QT_API)
     find_package(Qt5 REQUIRED COMPONENTS Core Quick Gui)
     find_package(Qt5Test REQUIRED)
-    find_package(PkgConfig)
-    find_package(WPEBackend-fdo 1.3.0 REQUIRED)
 endif ()
 
+if (ENABLE_WPE_QT_API OR USE_WPE_VIDEO_PLANE_DISPLAY_DMABUF)
+    find_package(WPEBackend-fdo 1.5.0 REQUIRED)
+endif ()
+
 add_definitions(-DBUILDING_WPE__=1)
 add_definitions(-DGETTEXT_PACKAGE="WPE")
 add_definitions(-DJSC_GLIB_API_ENABLED)

Modified: trunk/Tools/ChangeLog (254681 => 254682)


--- trunk/Tools/ChangeLog	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Tools/ChangeLog	2020-01-16 15:57:34 UTC (rev 254682)
@@ -1,3 +1,13 @@
+2020-01-16  Philippe Normand  <[email protected]>
+
+        [GStreamer][WPE] Client-side video rendering support
+        https://bugs.webkit.org/show_bug.cgi?id=206289
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * wpe/jhbuild.modules: Bump to libwpe and wpebackend-fdo git
+        snapshots, until 1.5.x releases are published.
+
 2020-01-16  Takashi Komori  <[email protected]>
 
         KeyedDecoderGeneric crashes when it accesses data with non-existing key

Modified: trunk/Tools/wpe/jhbuild.modules (254681 => 254682)


--- trunk/Tools/wpe/jhbuild.modules	2020-01-16 15:56:57 UTC (rev 254681)
+++ trunk/Tools/wpe/jhbuild.modules	2020-01-16 15:57:34 UTC (rev 254682)
@@ -184,8 +184,7 @@
   </autotools>
 
   <cmake id="libwpe">
-    <branch repo="wpewebkit" module="libwpe-1.4.0.tar.xz" version="1.4.0"
-            hash="sha256:e2d3494fc33fe946ad917fd6a3abd127462b91bba62ef8b35507e92f8ede4188"/>
+    <branch repo="github.com" module="WebPlatformForEmbedded/libwpe.git" checkoutdir="libwpe" tag="67ccb407efb295c727553145080937e8bb3a3211"/>
   </cmake>
 
   <cmake id="wpebackend-fdo">
@@ -193,8 +192,7 @@
       <dep package="libwpe"/>
       <dep package="glib"/>
     </dependencies>
-    <branch repo="wpewebkit" module="wpebackend-fdo-1.4.0.tar.xz" version="1.4.0"
-            hash="sha256:a919ca4a5bc445f9419a5b7f3781cfc98e5abcf5d7259eb1869f5ab20fd18baf"/>
+    <branch repo="github.com" module="Igalia/WPEBackend-fdo.git" checkoutdir="wpebackend-fdo" tag="17316d7365f500176138d900f95aae73ef0e223a"/>
   </cmake>
 
   <autotools id="libgpg-error" autogen-sh="autoreconf">
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to