[webkit-changes] [WebKit/WebKit] f4c73c: [GTK][WPE] Use GBM when available for WebGL in the...

Carlos Garcia Campos noreply at github.com
Fri Sep 6 00:53:00 PDT 2024


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

  Changed paths:
    M Source/WebCore/SourcesGTK.txt
    M Source/WebCore/SourcesWPE.txt
    M Source/WebCore/platform/TextureMapper.cmake
    A Source/WebCore/platform/graphics/gbm/DMABufBuffer.cpp
    A Source/WebCore/platform/graphics/gbm/DMABufBuffer.h
    M Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp
    M Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.h
    R Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBMTextureMapper.cpp
    R Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBMTextureMapper.h
    A Source/WebCore/platform/graphics/gbm/GraphicsContextGLTextureMapperGBM.cpp
    A Source/WebCore/platform/graphics/gbm/GraphicsContextGLTextureMapperGBM.h
    A Source/WebCore/platform/graphics/gbm/GraphicsLayerContentsDisplayDelegateGBM.cpp
    A Source/WebCore/platform/graphics/gbm/GraphicsLayerContentsDisplayDelegateGBM.h
    M Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp
    M Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h
    M Source/WebCore/platform/graphics/texmap/GraphicsLayerContentsDisplayDelegateTextureMapper.h
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBuffer.h
    A Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferDMABuf.cpp
    A Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferDMABuf.h
    M Source/cmake/OptionsWPE.cmake

  Log Message:
  -----------
  [GTK][WPE] Use GBM when available for WebGL in the web process
https://bugs.webkit.org/show_bug.cgi?id=279122

Reviewed by Alejandro G. Castro.

The solution we found to get the internal texture created by ANGLE is
weak, so we should only use it as fallback for systems where DMA-BUF is
not available. This patch adds a new impementation using the new
CoordinatedPlatformLayerBuffer to add a new one for DMABuf buffers. It
also adds a new class GraphicsContextGLTextureMapperGBM that will be
used also for the GPU process implementation.

* Source/WebCore/SourcesGTK.txt:
* Source/WebCore/SourcesWPE.txt:
* Source/WebCore/platform/TextureMapper.cmake:
* Source/WebCore/platform/graphics/gbm/DMABufBuffer.cpp: Added.
(WebCore::generateID):
(WebCore::DMABufBuffer::DMABufBuffer):
(WebCore::DMABufBuffer::setBuffer):
* Source/WebCore/platform/graphics/gbm/DMABufBuffer.h: Added.
* Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp:
(WebCore::GraphicsContextGLGBM::prepareForDisplay):
* Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.h:
* Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBMTextureMapper.cpp: Removed.
* Source/WebCore/platform/graphics/gbm/GraphicsContextGLTextureMapperGBM.cpp: Added.
(WebCore::GraphicsContextGLTextureMapperGBM::create):
(WebCore::GraphicsContextGLTextureMapperGBM::GraphicsContextGLTextureMapperGBM):
(WebCore::GraphicsContextGLTextureMapperGBM::~GraphicsContextGLTextureMapperGBM):
(WebCore::GraphicsContextGLTextureMapperGBM::platformInitialize):
(WebCore::GraphicsContextGLTextureMapperGBM::platformInitializeExtensions):
(WebCore::GraphicsContextGLTextureMapperGBM::createDrawingBuffer const):
(WebCore::GraphicsContextGLTextureMapperGBM::freeDrawingBuffers):
(WebCore::GraphicsContextGLTextureMapperGBM::bindNextDrawingBuffer):
(WebCore::GraphicsContextGLTextureMapperGBM::reshapeDrawingBuffer):
(WebCore::GraphicsContextGLTextureMapperGBM::prepareForDisplay):
* Source/WebCore/platform/graphics/gbm/GraphicsContextGLTextureMapperGBM.h: Added.
* Source/WebCore/platform/graphics/gbm/GraphicsLayerContentsDisplayDelegateGBM.cpp: Added.
(WebCore::GraphicsLayerContentsDisplayDelegateGBM::GraphicsLayerContentsDisplayDelegateGBM):
(WebCore::GraphicsLayerContentsDisplayDelegateGBM::setDisplayBuffer):
* Source/WebCore/platform/graphics/gbm/GraphicsLayerContentsDisplayDelegateGBM.h: Added.
* Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::createWebProcessGraphicsContextGL):
(WebCore::GraphicsContextGLTextureMapperANGLE::~GraphicsContextGLTextureMapperANGLE):
* Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h:
* Source/WebCore/platform/graphics/texmap/GraphicsLayerContentsDisplayDelegateTextureMapper.h:
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBuffer.h:
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferDMABuf.cpp: Added.
(WebCore::CoordinatedPlatformLayerBufferDMABuf::create):
(WebCore::CoordinatedPlatformLayerBufferDMABuf::CoordinatedPlatformLayerBufferDMABuf):
(WebCore::CoordinatedPlatformLayerBufferDMABuf::importDMABuf const):
(WebCore::CoordinatedPlatformLayerBufferDMABuf::paintToTextureMapper):
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferDMABuf.h: Added.
* Source/cmake/OptionsWPE.cmake:

Canonical link: https://commits.webkit.org/283253@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