WebKit Bugzilla
Attachment 361294 Details for
Bug 193715
: [WPE] Implement GStreamer based holepunch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193715-20190206153152.patch (text/plain), 22.80 KB, created by
Miguel Gomez
on 2019-02-06 06:31:54 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Miguel Gomez
Created:
2019-02-06 06:31:54 PST
Size:
22.80 KB
patch
obsolete
>Subversion Revision: 241015 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 76da75cb9ade9294c2662b05d6b433b3ce5307c2..a574d7a0b16fca837c610cd5a59d8509ca106e00 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,46 @@ >+2019-02-06 Miguel Gomez <magomez@igalia.com> >+ >+ [WPE] Implement GStreamer based holepunch >+ https://bugs.webkit.org/show_bug.cgi?id=193715 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. A platform dependent video sink will be used to render the video frames on >+ a plane below the browser. >+ >+ 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-05 Ryosuke Niwa <rniwa@webkit.org> > > REGRESSION (r240909): Release assert in FrameLoader::loadURL when navigating with a non-existent target name >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index e6bab68afd569566b456240507bfd96d6e6e397d..37c07a06ad1baf6c9f62813d072d0614296c4219 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,15 @@ >+2019-02-06 Miguel Gomez <magomez@igalia.com> >+ >+ [WPE] Implement GStreamer based holepunch >+ https://bugs.webkit.org/show_bug.cgi?id=193715 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a new parameter to the calls of TextureMapper::drawSolidColor(). >+ >+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: >+ (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext): >+ > 2019-02-06 Michael Catanzaro <mcatanzaro@igalia.com> > > REGRESSION(r240785): [SOUP] Broke cookie persistent storage >diff --git a/Source/WebCore/platform/graphics/MediaPlayer.cpp b/Source/WebCore/platform/graphics/MediaPlayer.cpp >index 49c449a2660bb0074266cfdd9ac58c095e0079e0..b729154c9777b911f15c1227fe0cb485b6c29f1c 100644 >--- a/Source/WebCore/platform/graphics/MediaPlayer.cpp >+++ b/Source/WebCore/platform/graphics/MediaPlayer.cpp >@@ -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() > { >diff --git a/Source/WebCore/platform/graphics/MediaPlayer.h b/Source/WebCore/platform/graphics/MediaPlayer.h >index 89f50e63244d123aac37b4564704ae6414302a21..41bcde24837cbb2ccc8146af78c2fdb6d6150e13 100644 >--- a/Source/WebCore/platform/graphics/MediaPlayer.h >+++ b/Source/WebCore/platform/graphics/MediaPlayer.h >@@ -576,6 +576,8 @@ public: > > bool performTaskAtMediaTime(WTF::Function<void()>&&, MediaTime); > >+ bool shouldIgnoreIntrinsicSize(); >+ > private: > MediaPlayer(MediaPlayerClient&); > >diff --git a/Source/WebCore/platform/graphics/MediaPlayerPrivate.h b/Source/WebCore/platform/graphics/MediaPlayerPrivate.h >index f4978bac7300fec07589187a052151f9837b3cf1..9700c0565098571c5903ef3ea342d8edb82e37c1 100644 >--- a/Source/WebCore/platform/graphics/MediaPlayerPrivate.h >+++ b/Source/WebCore/platform/graphics/MediaPlayerPrivate.h >@@ -284,6 +284,8 @@ public: > #endif > > virtual bool performTaskAtMediaTime(WTF::Function<void()>&&, MediaTime) { return false; } >+ >+ virtual bool shouldIgnoreIntrinsicSize() { return false; } > }; > > } >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >index e130c20083d554f0ae1684acef86731c83060fb7..72195584c6825c88e6353b69a4f0ce28eabd9524 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >@@ -133,6 +133,10 @@ GST_DEBUG_CATEGORY(webkit_media_player_debug); > namespace WebCore { > using namespace std; > >+#if USE(GSTREAMER_HOLEPUNCH) >+static 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, 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(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(); >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h >index 76aa5ccfd8931f0c44095dfd0d70f4aa8f31e59c..20c28c4a35caf1d40b04f14ae81131bbbeb61173 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h >@@ -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*); >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapper.h b/Source/WebCore/platform/graphics/texmap/TextureMapper.h >index 3556a95deea5d8adfe4f6654547cd0a4de0a0276..2ef6d2446e7998414b43a81f57bc72e170b44898 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapper.h >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapper.h >@@ -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. >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp >index ad68f2bd60f5c1d43e714ae2c77cdf613f9ac424..974b8578b88aa6435091e8b0c38bb2db710ef102 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp >@@ -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); >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h >index e1e3905d33e72731e193d26efc3b1bccdee97363..ca056af66030ed1eed92fa5c2a28da90cb34eb6a 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h >@@ -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; >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp >index 890da9d62b34f77ceb3b047608658efd04d84974..f1b14d84cbd9c51828a74df18a2e4faddd917ddd 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp >@@ -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; >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp >index 8cc58d61d9b503797f072725e0c6d783de5d1de6..963bdc4864a7c661608e2a419b514588062654f1 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp >@@ -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); > } >diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h b/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h >index 8b9455afef886b0c9adb1086104e77f8610b8dd9..51614e821108e648dfb0bdc021ec6b713286e47f 100644 >--- a/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h >+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h >@@ -65,6 +65,13 @@ public: > > std::unique_ptr<TextureMapperPlatformLayerBuffer> clone(); > >+ class HolePunchClient { >+ public: >+ virtual void setVideoRectangle(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 >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >index 892f6b201344a46f94c0d8989321b2dd0b7682d4..3176ba102b0c1110bcde5fc4474a2d2c53ae5ea6 100644 >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >@@ -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 >diff --git a/Source/WebCore/rendering/RenderVideo.cpp b/Source/WebCore/rendering/RenderVideo.cpp >index 731cb63436c47862d4acbeda279baaa37250a7e1..2eed9c45b2782b59d49d591fdacf44fdce8ef900 100644 >--- a/Source/WebCore/rendering/RenderVideo.cpp >+++ b/Source/WebCore/rendering/RenderVideo.cpp >@@ -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()) >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >index 1b2ed1b0275e65bbe191955998c293a83ba64608..a5f15f01a5085b069842bae237f5fd0d3df10f07 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >+++ b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >@@ -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); > >diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake >index 58ed3feb45e32bbe667e63aa0532c9ba5af283eb..fe4a68b6c79d5d4c9718d8dbeb52779b41d409ab 100644 >--- a/Source/cmake/OptionsWPE.cmake >+++ b/Source/cmake/OptionsWPE.cmake >@@ -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() >diff --git a/ChangeLog b/ChangeLog >index b6696e137fa636617da1091602e3e6c0b669071e..da564ac930c7b2d46bfbde604aa2990426e3025c 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,16 @@ >+2019-02-06 Miguel Gomez <magomez@igalia.com> >+ >+ [WPE] Implement GStreamer based holepunch >+ https://bugs.webkit.org/show_bug.cgi?id=193715 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 >index 0000000000000000000000000000000000000000..f69d08d4c80c7f910cd6416818e0bba3da83e6ad >--- /dev/null >+++ b/ManualTests/wpe/video-player-holepunch.html >@@ -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>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193715
:
359874
|
359884
|
360455
|
360459
|
361189
|
361294
|
361386