[webkit-changes] [WebKit/WebKit] 36eefe: [GStreamer] Add support for DMA-BUF to GL video sink

Carlos Garcia Campos noreply at github.com
Wed Sep 18 05:06:08 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 36eefe856208603fc8b66a8e111defb51407de48
      https://github.com/WebKit/WebKit/commit/36eefe856208603fc8b66a8e111defb51407de48
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2024-09-18 (Wed, 18 Sep 2024)

  Changed paths:
    M Source/WebCore/SourcesGTK.txt
    M Source/WebCore/SourcesWPE.txt
    M Source/WebCore/platform/SourcesGStreamer.txt
    M Source/WebCore/platform/TextureMapper.cmake
    M Source/WebCore/platform/graphics/PlatformDisplay.cpp
    M Source/WebCore/platform/graphics/PlatformDisplay.h
    M Source/WebCore/platform/graphics/egl/GLDisplay.cpp
    M Source/WebCore/platform/graphics/egl/GLDisplay.h
    M Source/WebCore/platform/graphics/gbm/DMABufBuffer.h
    R Source/WebCore/platform/graphics/gbm/DMABufColorSpace.h
    R Source/WebCore/platform/graphics/gbm/DMABufEGLUtilities.h
    R Source/WebCore/platform/graphics/gbm/DMABufFormat.h
    R Source/WebCore/platform/graphics/gbm/DMABufObject.h
    R Source/WebCore/platform/graphics/gbm/DMABufReleaseFlag.h
    R Source/WebCore/platform/graphics/gbm/GBMBufferSwapchain.cpp
    R Source/WebCore/platform/graphics/gbm/GBMBufferSwapchain.h
    R Source/WebCore/platform/graphics/gstreamer/DMABufUtilities.cpp
    R Source/WebCore/platform/graphics/gstreamer/DMABufUtilities.h
    R Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp
    R Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.h
    M Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
    M Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp
    R Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp
    R Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferDMABuf.cpp
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferDMABuf.h
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferVideo.cpp
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferVideo.h
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferYUV.cpp
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferYUV.h
    M Source/cmake/OptionsGTK.cmake
    M Source/cmake/OptionsWPE.cmake
    M Tools/Scripts/webkitpy/style/checker.py

  Log Message:
  -----------
  [GStreamer] Add support for DMA-BUF to GL video sink
https://bugs.webkit.org/show_bug.cgi?id=279672

Reviewed by Alejandro G. Castro and Xabier Rodriguez-Calvar.

By adding DMA-BUF support to GL video sink, we can fallback to GL memory
when gst can't provide DMA-BUF memory, instead of mapping the frame to
upload it as a DMA-BUF buffer. With the new platform layer buffers we
don't need specific TextureMapperPlatformLayerProxy for DMA-BUF, we can
add support for YUV formats to CoordinatedPlatformLayerBufferDMABuf and
use the existing GL proxy. This simplifies the code and we can remove a
lot of code that is now unsued.

* Source/WebCore/SourcesGTK.txt:
* Source/WebCore/SourcesWPE.txt:
* Source/WebCore/platform/SourcesGStreamer.txt:
* Source/WebCore/platform/TextureMapper.cmake:
* Source/WebCore/platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::dmabufFormatsForVideo):
* Source/WebCore/platform/graphics/PlatformDisplay.h:
* Source/WebCore/platform/graphics/egl/GLDisplay.cpp:
(WebCore::queryDMABufFormats):
(WebCore::GLDisplay::dmabufFormats):
(WebCore::GLDisplay::dmabufFormatsForVideo):
* Source/WebCore/platform/graphics/egl/GLDisplay.h:
* Source/WebCore/platform/graphics/gbm/DMABufBuffer.h:
* Source/WebCore/platform/graphics/gbm/DMABufColorSpace.h: Removed.
* Source/WebCore/platform/graphics/gbm/DMABufEGLUtilities.h: Removed.
* Source/WebCore/platform/graphics/gbm/DMABufFormat.h: Removed.
* Source/WebCore/platform/graphics/gbm/DMABufObject.h: Removed.
* Source/WebCore/platform/graphics/gbm/DMABufReleaseFlag.h: Removed.
* Source/WebCore/platform/graphics/gbm/GBMBufferSwapchain.cpp: Removed.
* Source/WebCore/platform/graphics/gbm/GBMBufferSwapchain.h: Removed.
* Source/WebCore/platform/graphics/gstreamer/DMABufUtilities.cpp: Removed.
* Source/WebCore/platform/graphics/gstreamer/DMABufUtilities.h: Removed.
* Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp: Removed.
* Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.h: Removed.
* Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
(initializeDMABufAvailability):
(buildDMABufCaps):
(webKitGLVideoSinkConstructed):
(webKitGLVideoSinkProbePlatform):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::registerWebKitGStreamerElements):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
(WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::createVideoSinkDMABuf): Deleted.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp:
(WebCore::VideoFrameGStreamer::createFromPixelBuffer):
(WebCore::VideoFrameGStreamer::convert):
* Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp: Removed.
* Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.h: Removed.
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferDMABuf.cpp:
(WebCore::importToTexture):
(WebCore::formatIsYUV):
(WebCore::yuvFormatPlaneInfo):
(WebCore::CoordinatedPlatformLayerBufferDMABuf::importYUV const):
(WebCore::CoordinatedPlatformLayerBufferDMABuf::importDMABuf const):
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferDMABuf.h:
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferVideo.cpp:
(WebCore::CoordinatedPlatformLayerBufferVideo::create):
(WebCore::CoordinatedPlatformLayerBufferVideo::CoordinatedPlatformLayerBufferVideo):
(WebCore::CoordinatedPlatformLayerBufferVideo::createBufferIfNeeded):
(WebCore::videoFormatToDRMFourcc):
(WebCore::CoordinatedPlatformLayerBufferVideo::createBufferFromDMABufMemory):
(WebCore::CoordinatedPlatformLayerBufferVideo::createBufferFromGLMemory):
(WebCore::CoordinatedPlatformLayerBufferVideo::paintToTextureMapper):
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferVideo.h:
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferYUV.cpp:
(WebCore::CoordinatedPlatformLayerBufferYUV::create):
(WebCore::CoordinatedPlatformLayerBufferYUV::CoordinatedPlatformLayerBufferYUV):
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferYUV.h:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

Canonical link: https://commits.webkit.org/283836@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list