This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Linux] GBMBufferSwapchain should only conditionally create linear-fo…
…rmatted buffer objects https://bugs.webkit.org/show_bug.cgi?id=240637 Reviewed by Adrian Perez de Castro. Spawning new gbm_bo objects should not default to requesting linear-storage buffers. Instead, these should only be created when necessary, e.g. when copying software-decoded video data into these buffers. By default, no GBM flags are used. When required, the linear-storage requirement is enscribed in the new flags field of the GBMBufferSwapchain::BufferDescription object and acted upon in the GBMBufferSwapchain::getBuffer() call, using the GBM_BO_USE_LINEAR flag in the gbm_bo_create() call. The DMABuf-specific sink in MediaPlayerPrivateGStreamer is the only place at the moment where linear-storage buffers are used since software-decoded material originates here and is stored in linear memory. * Source/WebCore/platform/graphics/gbm/GBMBufferSwapchain.cpp: (WebCore::GBMBufferSwapchain::getBuffer): * Source/WebCore/platform/graphics/gbm/GBMBufferSwapchain.h: * Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp: (WebCore::GraphicsContextGLANGLE::makeContextCurrent): * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor): Canonical link: https://commits.webkit.org/250959@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 4 changed files with 18 additions and 5 deletions.