[WPE] Implement GStreamer based holepunch
authormagomez@igalia.com <magomez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2019 14:42:32 +0000 (14:42 +0000)
committermagomez@igalia.com <magomez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2019 14:42:32 +0000 (14:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193715

Reviewed by Xabier Rodriguez-Calvar.

.:

Add GSTREAMER_HOLEPUNCH option to the WPE port with a manual test to
check the feature.

* ManualTests/wpe/video-player-holepunch.html: Added.
* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Implement GStreamer based holepunch functionality. Instead of getting the video frames from the
video sink and drawing then, the player just draws a transparent rectangle on the position where
the video should be. MediaPlayerPrivateGStreamerBase will instantiate a platform dependant video
sink which will be in charge of displaying the video frames in some way (usually on a plane below
the browser), and will push empty frames to the compositor indicating that the rectangle to draw
should overwrite the existent content. TextureMapperPlatformLayerBuffer::HolePunchClient is used
to tell the video sink where to position the video so it's set below the browser transparent hole.

Added ManualTest wpe/video-player-holepunch.html to test the feature.

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::shouldIgnoreIntrinsicSize):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::shouldIgnoreIntrinsicSize):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const):
(WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded):
(WebCore::setRectangleToVideoSink):
(WebCore::GStreamerHolePunchClient::GStreamerHolePunchClient):
(WebCore::MediaPlayerPrivateGStreamerBase::createHolePunchVideoSink):
(WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::drawSolidColor):
* platform/graphics/texmap/TextureMapperGL.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelf):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
(WebCore::TextureMapperPlatformLayerBuffer::setHolePunchClient):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::videoBox const):

Source/WebKit:

Add a new parameter to the calls of TextureMapper::drawSolidColor().

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):

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

19 files changed:
ChangeLog
ManualTests/wpe/video-player-holepunch.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/MediaPlayerPrivate.h
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h
Source/WebCore/platform/graphics/texmap/TextureMapper.h
Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperGL.h
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
Source/WebCore/rendering/RenderVideo.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
Source/cmake/OptionsWPE.cmake

index b6696e1..32f46f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2019-02-07  Miguel Gomez  <magomez@igalia.com>
+
+        [WPE] Implement GStreamer based holepunch
+        https://bugs.webkit.org/show_bug.cgi?id=193715
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Add GSTREAMER_HOLEPUNCH option to the WPE port with a manual test to
+        check the feature.
+
+        * ManualTests/wpe/video-player-holepunch.html: Added.
+        * Source/cmake/OptionsWPE.cmake:
+
 2019-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [WPE] Enable font variations
diff --git a/ManualTests/wpe/video-player-holepunch.html b/ManualTests/wpe/video-player-holepunch.html
new file mode 100644 (file)
index 0000000..f69d08d
--- /dev/null
@@ -0,0 +1,33 @@
+<html>
+  <head>
+    <title>WPE holepunch test</title>
+    <style>
+      video {
+          width: 400px;
+          height: 400px;
+      }
+    </style>
+  </head>
+  <body>
+    <p>
+      <strong>WPE holepunch test</strong>
+    </p>
+    <p>
+      This test checks whether the holepunch feature is working on WPE.
+    </p>
+    <p>
+      There is a video player of 400x400 placed below this text. If the video playback is visible,
+      then the holepunch option is disabled or it's not working properly.
+    </p>
+    <p>
+      If everything is working fine, there should be a transparent rectangle of 400x400 just
+      below this.
+    </p>
+    <video id="video"></video>
+    <script type="text/javascript">
+      var v = document.getElementById("video");
+      v.src = "../../LayoutTests/media/content/long-test.mp4";
+      v.play();
+    </script>
+  </body>
+</html>
index ee4ff5b..9a5813d 100644 (file)
@@ -1,3 +1,49 @@
+2019-02-07  Miguel Gomez  <magomez@igalia.com>
+
+        [WPE] Implement GStreamer based holepunch
+        https://bugs.webkit.org/show_bug.cgi?id=193715
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Implement GStreamer based holepunch functionality. Instead of getting the video frames from the
+        video sink and drawing then, the player just draws a transparent rectangle on the position where
+        the video should be. MediaPlayerPrivateGStreamerBase will instantiate a platform dependant video
+        sink which will be in charge of displaying the video frames in some way (usually on a plane below
+        the browser), and will push empty frames to the compositor indicating that the rectangle to draw
+        should overwrite the existent content. TextureMapperPlatformLayerBuffer::HolePunchClient is used
+        to tell the video sink where to position the video so it's set below the browser transparent hole.
+
+        Added ManualTest wpe/video-player-holepunch.html to test the feature.
+
+        * platform/graphics/MediaPlayer.cpp:
+        (WebCore::MediaPlayer::shouldIgnoreIntrinsicSize):
+        * platform/graphics/MediaPlayer.h:
+        * platform/graphics/MediaPlayerPrivate.h:
+        (WebCore::MediaPlayerPrivateInterface::shouldIgnoreIntrinsicSize):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize const):
+        (WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded):
+        (WebCore::setRectangleToVideoSink):
+        (WebCore::GStreamerHolePunchClient::GStreamerHolePunchClient):
+        (WebCore::MediaPlayerPrivateGStreamerBase::createHolePunchVideoSink):
+        (WebCore::MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer):
+        (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
+        * platform/graphics/texmap/TextureMapper.h:
+        * platform/graphics/texmap/TextureMapperGL.cpp:
+        (WebCore::TextureMapperGL::drawSolidColor):
+        * platform/graphics/texmap/TextureMapperGL.h:
+        * platform/graphics/texmap/TextureMapperLayer.cpp:
+        (WebCore::TextureMapperLayer::paintSelf):
+        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
+        (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
+        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
+        (WebCore::TextureMapperPlatformLayerBuffer::setHolePunchClient):
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
+        * rendering/RenderVideo.cpp:
+        (WebCore::RenderVideo::videoBox const):
+
 2019-02-06  Benjamin Poulain  <benjamin@webkit.org>
 
         Unreviewed, rolling out r240759 and r240944.
index 49c449a..b729154 100644 (file)
@@ -1552,6 +1552,11 @@ bool MediaPlayer::performTaskAtMediaTime(WTF::Function<void()>&& task, MediaTime
     return m_private->performTaskAtMediaTime(WTFMove(task), time);
 }
 
+bool MediaPlayer::shouldIgnoreIntrinsicSize()
+{
+    return m_private->shouldIgnoreIntrinsicSize();
+}
+
 #if !RELEASE_LOG_DISABLED
 const Logger& MediaPlayer::mediaPlayerLogger()
 {
index 89f50e6..41bcde2 100644 (file)
@@ -576,6 +576,8 @@ public:
 
     bool performTaskAtMediaTime(WTF::Function<void()>&&, MediaTime);
 
+    bool shouldIgnoreIntrinsicSize();
+
 private:
     MediaPlayer(MediaPlayerClient&);
 
index f4978ba..9700c05 100644 (file)
@@ -284,6 +284,8 @@ public:
 #endif
 
     virtual bool performTaskAtMediaTime(WTF::Function<void()>&&, MediaTime) { return false; }
+
+    virtual bool shouldIgnoreIntrinsicSize() { return false; }
 };
 
 }
index e130c20..ad6200c 100644 (file)
@@ -133,6 +133,10 @@ GST_DEBUG_CATEGORY(webkit_media_player_debug);
 namespace WebCore {
 using namespace std;
 
+#if USE(GSTREAMER_HOLEPUNCH)
+static const FloatSize s_holePunchDefaultFrameSize(1280, 720);
+#endif
+
 static int greatestCommonDivisor(int a, int b)
 {
     while (b) {
@@ -487,6 +491,13 @@ bool MediaPlayerPrivateGStreamerBase::ensureGstGLContext()
 // Returns the size of the video
 FloatSize MediaPlayerPrivateGStreamerBase::naturalSize() const
 {
+#if USE(GSTREAMER_HOLEPUNCH)
+    // When using the holepuch we may not be able to get the video frames size, so we can't use
+    // it. But we need to report some non empty naturalSize for the player's GraphicsLayer
+    // to be properly created.
+    return s_holePunchDefaultFrameSize;
+#endif
+
     if (!hasVideo())
         return FloatSize();
 
@@ -672,6 +683,9 @@ PlatformLayer* MediaPlayerPrivateGStreamerBase::platformLayer() const
 #if USE(NICOSIA)
 void MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded()
 {
+#if USE(GSTREAMER_HOLEPUNCH)
+    pushNextHolePunchBuffer();
+#endif
 }
 #else
 RefPtr<TextureMapperPlatformLayerProxy> MediaPlayerPrivateGStreamerBase::proxy() const
@@ -681,6 +695,9 @@ RefPtr<TextureMapperPlatformLayerProxy> MediaPlayerPrivateGStreamerBase::proxy()
 
 void MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded()
 {
+#if USE(GSTREAMER_HOLEPUNCH)
+    pushNextHolePunchBuffer();
+#endif
 }
 #endif
 
@@ -1078,10 +1095,62 @@ void MediaPlayerPrivateGStreamerBase::ensureGLVideoSinkContext()
 }
 #endif // USE(GSTREAMER_GL)
 
+#if USE(GSTREAMER_HOLEPUNCH)
+static void setRectangleToVideoSink(GstElement* videoSink, const IntRect& rect)
+{
+    // Here goes the platform-dependant code to set to the videoSink the size
+    // and position of the video rendering window. Mark them unused as default.
+    UNUSED_PARAM(videoSink);
+    UNUSED_PARAM(rect);
+}
+
+class GStreamerHolePunchClient : public TextureMapperPlatformLayerBuffer::HolePunchClient {
+public:
+    GStreamerHolePunchClient(GRefPtr<GstElement>&& videoSink) : m_videoSink(WTFMove(videoSink)) { };
+    void setVideoRectangle(const IntRect& rect) final { setRectangleToVideoSink(m_videoSink.get(), rect); }
+private:
+    GRefPtr<GstElement> m_videoSink;
+};
+
+GstElement* MediaPlayerPrivateGStreamerBase::createHolePunchVideoSink()
+{
+    // Here goes the platform-dependant code to create the videoSink. As a default
+    // we use a fakeVideoSink so nothing is drawn to the page.
+    GstElement* videoSink =  gst_element_factory_make("fakevideosink", nullptr);
+
+    return videoSink;
+}
+
+void MediaPlayerPrivateGStreamerBase::pushNextHolePunchBuffer()
+{
+    auto proxyOperation =
+        [this](TextureMapperPlatformLayerProxy& proxy)
+        {
+            LockHolder holder(proxy.lock());
+            std::unique_ptr<TextureMapperPlatformLayerBuffer> layerBuffer = std::make_unique<TextureMapperPlatformLayerBuffer>(0, m_size, TextureMapperGL::ShouldNotBlend, GL_DONT_CARE);
+            std::unique_ptr<GStreamerHolePunchClient> holePunchClient = std::make_unique<GStreamerHolePunchClient>(m_videoSink.get());
+            layerBuffer->setHolePunchClient(WTFMove(holePunchClient));
+            proxy.pushNextBuffer(WTFMove(layerBuffer));
+        };
+
+#if USE(NICOSIA)
+    proxyOperation(downcast<Nicosia::ContentLayerTextureMapperImpl>(m_nicosiaLayer->impl()).proxy());
+#else
+    proxyOperation(*m_platformLayerProxy);
+#endif
+}
+#endif
+
 GstElement* MediaPlayerPrivateGStreamerBase::createVideoSink()
 {
     acceleratedRenderingStateChanged();
 
+#if USE(GSTREAMER_HOLEPUNCH)
+    m_videoSink = createHolePunchVideoSink();
+    pushNextHolePunchBuffer();
+    return m_videoSink.get();
+#endif
+
 #if USE(GSTREAMER_GL)
     if (m_renderingCanBeAccelerated)
         m_videoSink = createVideoSinkGL();
index 76aa5cc..20c28c4 100644 (file)
@@ -173,6 +173,12 @@ protected:
     MediaPlayerPrivateGStreamerBase(MediaPlayer*);
     virtual GstElement* createVideoSink();
 
+#if USE(GSTREAMER_HOLEPUNCH)
+    GstElement* createHolePunchVideoSink();
+    void pushNextHolePunchBuffer();
+    bool shouldIgnoreIntrinsicSize() final { return true; }
+#endif
+
 #if USE(GSTREAMER_GL)
     static GstFlowReturn newSampleCallback(GstElement*, MediaPlayerPrivateGStreamerBase*);
     static GstFlowReturn newPrerollCallback(GstElement*, MediaPlayerPrivateGStreamerBase*);
index 3556a95..2ef6d24 100644 (file)
@@ -70,7 +70,7 @@ public:
     virtual void drawNumber(int number, const Color&, const FloatPoint&, const TransformationMatrix&) = 0;
 
     virtual void drawTexture(const BitmapTexture&, const FloatRect& target, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0f, unsigned exposedEdges = AllEdges) = 0;
-    virtual void drawSolidColor(const FloatRect&, const TransformationMatrix&, const Color&) = 0;
+    virtual void drawSolidColor(const FloatRect&, const TransformationMatrix&, const Color&, bool) = 0;
     virtual void clearColor(const Color&) = 0;
 
     // makes a surface the target for the following drawTexture calls.
index ad68f2b..974b857 100644 (file)
@@ -504,13 +504,13 @@ void TextureMapperGL::drawTexture(GLuint texture, Flags flags, const IntSize& te
     drawTexturedQuadWithProgram(program.get(), texture, flags, textureSize, targetRect, modelViewMatrix, opacity);
 }
 
-void TextureMapperGL::drawSolidColor(const FloatRect& rect, const TransformationMatrix& matrix, const Color& color)
+void TextureMapperGL::drawSolidColor(const FloatRect& rect, const TransformationMatrix& matrix, const Color& color, bool isBlendingAllowed)
 {
     Flags flags = 0;
     TextureMapperShaderProgram::Options options = TextureMapperShaderProgram::SolidColor;
     if (!matrix.mapQuad(rect).isRectilinear()) {
         options |= TextureMapperShaderProgram::Antialiasing;
-        flags |= ShouldBlend | ShouldAntialias;
+        flags |= ShouldAntialias | (isBlendingAllowed ? ShouldBlend : 0);
     }
 
     Ref<TextureMapperShaderProgram> program = data().getShaderProgram(options);
@@ -519,7 +519,7 @@ void TextureMapperGL::drawSolidColor(const FloatRect& rect, const Transformation
     float r, g, b, a;
     Color(premultipliedARGBFromColor(color)).getRGBA(r, g, b, a);
     glUniform4f(program->colorLocation(), r, g, b, a);
-    if (a < 1)
+    if (a < 1 && isBlendingAllowed)
         flags |= ShouldBlend;
 
     draw(rect, matrix, program.get(), GL_TRIANGLE_FAN, flags);
index e1e3905..ca056af 100644 (file)
@@ -53,7 +53,8 @@ public:
         ShouldRotateTexture180 = 0x20,
         ShouldRotateTexture270 = 0x40,
         ShouldConvertTextureBGRAToRGBA = 0x80,
-        ShouldConvertTextureARGBToRGBA = 0x100
+        ShouldConvertTextureARGBToRGBA = 0x100,
+        ShouldNotBlend = 0x200
     };
 
     typedef int Flags;
@@ -63,7 +64,7 @@ public:
     void drawNumber(int number, const Color&, const FloatPoint&, const TransformationMatrix&) override;
     void drawTexture(const BitmapTexture&, const FloatRect&, const TransformationMatrix&, float opacity, unsigned exposedEdges) override;
     virtual void drawTexture(GLuint texture, Flags, const IntSize& textureSize, const FloatRect& targetRect, const TransformationMatrix& modelViewMatrix, float opacity, unsigned exposedEdges = AllEdges);
-    void drawSolidColor(const FloatRect&, const TransformationMatrix&, const Color&) override;
+    void drawSolidColor(const FloatRect&, const TransformationMatrix&, const Color&, bool) override;
     void clearColor(const Color&) override;
 
     void bindSurface(BitmapTexture* surface) override;
index 890da9d..f1b14d8 100644 (file)
@@ -130,7 +130,7 @@ void TextureMapperLayer::paintSelf(const TextureMapperPaintOptions& options)
     transform.multiply(m_layerTransforms.combined);
 
     if (m_state.solidColor.isValid() && !m_state.contentsRect.isEmpty() && m_state.solidColor.isVisible()) {
-        options.textureMapper.drawSolidColor(m_state.contentsRect, transform, blendWithOpacity(m_state.solidColor, options.opacity));
+        options.textureMapper.drawSolidColor(m_state.contentsRect, transform, blendWithOpacity(m_state.solidColor, options.opacity), true);
         if (m_state.showDebugBorders)
             options.textureMapper.drawBorder(m_state.debugBorderColor, m_state.debugBorderWidth, layerRect(), transform);
         return;
index 8cc58d6..963bdc4 100644 (file)
@@ -28,6 +28,7 @@
 
 #if USE(COORDINATED_GRAPHICS_THREADED)
 
+#include "FloatRect.h"
 #include "NotImplemented.h"
 
 namespace WebCore {
@@ -77,6 +78,13 @@ void TextureMapperPlatformLayerBuffer::paintToTextureMapper(TextureMapper& textu
         return;
     }
 
+    if (m_holePunchClient && m_extraFlags & TextureMapperGL::ShouldNotBlend) {
+        ASSERT(!m_texture);
+        m_holePunchClient->setVideoRectangle(enclosingIntRect(modelViewMatrix.mapRect(targetRect)));
+        texmapGL.drawSolidColor(targetRect, modelViewMatrix, Color(0, 0, 0, 0), false);
+        return;
+    }
+
     ASSERT(m_textureID);
     texmapGL.drawTexture(m_textureID, m_extraFlags, m_size, targetRect, modelViewMatrix, opacity);
 }
index 8b9455a..3d1604b 100644 (file)
@@ -65,6 +65,13 @@ public:
 
     std::unique_ptr<TextureMapperPlatformLayerBuffer> clone();
 
+    class HolePunchClient {
+    public:
+        virtual void setVideoRectangle(const IntRect&) = 0;
+    };
+
+    void setHolePunchClient(std::unique_ptr<HolePunchClient>&& client) { m_holePunchClient = WTFMove(client); }
+
 private:
 
     RefPtr<BitmapTexture> m_texture;
@@ -76,6 +83,7 @@ private:
     TextureMapperGL::Flags m_extraFlags;
     bool m_hasManagedTexture;
     std::unique_ptr<UnmanagedBufferDataHolder> m_unmanagedBufferDataHolder;
+    std::unique_ptr<HolePunchClient> m_holePunchClient;
 };
 
 } // namespace WebCore
index 892f6b2..3176ba1 100644 (file)
@@ -411,6 +411,8 @@ void CoordinatedGraphicsLayer::setContentsToPlatformLayer(PlatformLayer* platfor
     if (m_nicosia.contentLayer != contentLayer) {
         m_nicosia.contentLayer = contentLayer;
         m_nicosia.delta.contentLayerChanged = true;
+        if (m_nicosia.contentLayer)
+            m_shouldUpdatePlatformLayer = true;
     }
     notifyFlushRequired();
 #else
index 731cb63..2eed9c4 100644 (file)
@@ -158,6 +158,10 @@ void RenderVideo::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
 
 IntRect RenderVideo::videoBox() const
 {
+    auto mediaPlayer = videoElement().player();
+    if (mediaPlayer && mediaPlayer->shouldIgnoreIntrinsicSize())
+        return snappedIntRect(contentBoxRect());
+
     LayoutSize intrinsicSize = this->intrinsicSize();
 
     if (videoElement().shouldDisplayPosterImage())
index 5b04f5a..e2486af 100644 (file)
@@ -1,3 +1,15 @@
+2019-02-07  Miguel Gomez  <magomez@igalia.com>
+
+        [WPE] Implement GStreamer based holepunch
+        https://bugs.webkit.org/show_bug.cgi?id=193715
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Add a new parameter to the calls of TextureMapper::drawSolidColor().
+
+        * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
+        (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
+
 2019-02-06  Benjamin Poulain  <benjamin@webkit.org>
 
         Unreviewed, rolling out r240759 and r240944.
index 1b2ed1b..a5f15f0 100644 (file)
@@ -82,7 +82,7 @@ void CoordinatedGraphicsScene::paintToCurrentGLContext(const TransformationMatri
         RGBA32 rgba = makeRGBA32FromFloats(backgroundColor.red(),
             backgroundColor.green(), backgroundColor.blue(),
             backgroundColor.alpha() * opacity);
-        m_textureMapper->drawSolidColor(clipRect, TransformationMatrix(), Color(rgba));
+        m_textureMapper->drawSolidColor(clipRect, TransformationMatrix(), Color(rgba), true);
     } else
         m_textureMapper->clearColor(m_viewBackgroundColor);
 
index 58ed3fe..fe4a68b 100644 (file)
@@ -68,6 +68,7 @@ WEBKIT_OPTION_DEFINE(ENABLE_WPE_QT_API "Whether to enable support for the Qt5/QM
 
 # Private options specific to the WPE port.
 WEBKIT_OPTION_DEFINE(USE_OPENVR "Whether to use OpenVR as WebVR backend." PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
+WEBKIT_OPTION_DEFINE(USE_GSTREAMER_HOLEPUNCH "Whether to enable GStreamer holepunch" PRIVATE OFF)
 
 if (CMAKE_SYSTEM_NAME MATCHES "Linux")
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE ON)
@@ -91,6 +92,8 @@ if (("${PC_CAIRO_VERSION}" VERSION_GREATER "1.16.0" OR "${PC_CAIRO_VERSION}" STR
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VARIATION_FONTS PRIVATE ON)
 endif ()
 
+WEBKIT_OPTION_DEPEND(USE_GSTREAMER_HOLEPUNCH ENABLE_VIDEO)
+
 include(GStreamerDependencies)
 
 WEBKIT_OPTION_END()