[webkit-changes] [WebKit/WebKit] ed3ac4: [Nicosia] Holepunch broken when media controls are...
Loïc Yhuel
noreply at github.com
Thu Jan 11 01:59:41 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ed3ac4ca860410fa6d225f8c597e0bd75a2e095a
https://github.com/WebKit/WebKit/commit/ed3ac4ca860410fa6d225f8c597e0bd75a2e095a
Author: Loïc Yhuel <loic.yhuel at softathome.com>
Date: 2024-01-11 (Thu, 11 Jan 2024)
Changed paths:
M ManualTests/wpe/video-player-holepunch-external.html
M ManualTests/wpe/video-player-holepunch-gstreamer.html
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
M Source/WebCore/platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp
M Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp
M Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.h
Log Message:
-----------
[Nicosia] Holepunch broken when media controls are enabled
https://bugs.webkit.org/show_bug.cgi?id=267322
Reviewed by Miguel Gomez.
Enabling the media controls creates the shadow root, which destroys the
RenderVideo, RenderLayer, RenderLayerBacking and CoordinatedGraphicsLayer.
Then the RenderVideo is created again, a new CoordinatedGraphicsLayer is
created, then CoordinatedGraphicsLayer::setContentsToPlatformLayer is called
with the PlatformLayer of the MediaPlayerPrivate.
CoordinatedGraphicsLayer::updatePlatformLayer is called, so the
MediaPlayerPrivate pushes a new buffer (pushNextHolePunchBuffer).
But later when the old layer is removed in CoordinatedGraphicsScene,
TextureMapperPlatformLayerProxyGL::invalidate deletes the buffer.
So we disable the buffer invalidation in TextureMapperPlatformLayerProxyGL for
the holepunch cases.
Pushing new buffers in swapBuffersIfNeeded is no longer needed.
* ManualTests/wpe/video-player-holepunch-external.html: Show the controls
* ManualTests/wpe/video-player-holepunch-gstreamer.html: Ditto
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::swapBuffersIfNeeded):
* Source/WebCore/platform/graphics/holepunch/MediaPlayerPrivateHolePunch.cpp:
(WebCore::MediaPlayerPrivateHolePunch::MediaPlayerPrivateHolePunch):
(WebCore::MediaPlayerPrivateHolePunch::swapBuffersIfNeeded):
* Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp:
(WebCore::TextureMapperPlatformLayerProxyGL::TextureMapperPlatformLayerProxyGL):
(WebCore::TextureMapperPlatformLayerProxyGL::invalidate):
* Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.h:
Canonical link: https://commits.webkit.org/272907@main
More information about the webkit-changes
mailing list