[webkit-changes] [WebKit/WebKit] d009eb: [TextureMapper] Add GLContextWrapper to handle the...

Carlos Garcia Campos noreply at github.com
Tue Feb 27 05:14:03 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d009eb90543f0e25ee70cfb6eef3db2b0ec64d62
      https://github.com/WebKit/WebKit/commit/d009eb90543f0e25ee70cfb6eef3db2b0ec64d62
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2024-02-27 (Tue, 27 Feb 2024)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/PlatformPlayStation.cmake
    M Source/WebCore/PlatformWin.cmake
    M Source/WebCore/SourcesGTK.txt
    M Source/WebCore/SourcesWPE.txt
    M Source/WebCore/platform/graphics/angle/PlatformDisplayANGLE.cpp
    M Source/WebCore/platform/graphics/egl/GLContext.cpp
    M Source/WebCore/platform/graphics/egl/GLContext.h
    A Source/WebCore/platform/graphics/egl/GLContextWrapper.cpp
    A Source/WebCore/platform/graphics/egl/GLContextWrapper.h
    M Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp
    M Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h

  Log Message:
  -----------
  [TextureMapper] Add GLContextWrapper to handle the current GL context
https://bugs.webkit.org/show_bug.cgi?id=270078

Reviewed by Miguel Gomez.

We currently have GLContext handling the current context, but it doesn't
always work. For example, if there's WebGL content, after ANGLE context
is made current. This is not problematic with Cairo because only ANGLE
is making it context current in the main thread, but with Skia there's
another GL context that is made current in the main thread when using
the GPU renderer.
GLContextWrapper is a new class to handle the current GL context,
implemented by GLContext and GraphicsContextGLTextureMapperANGLE.

* Source/WebCore/Headers.cmake:
* Source/WebCore/PlatformPlayStation.cmake:
* Source/WebCore/PlatformWin.cmake:
* Source/WebCore/SourcesGTK.txt:
* Source/WebCore/SourcesWPE.txt:
* Source/WebCore/platform/graphics/egl/GLContext.cpp:
(WebCore::GLContext::~GLContext):
(WebCore::GLContext::makeCurrentImpl):
(WebCore::GLContext::unmakeCurrentImpl):
(WebCore::GLContext::makeContextCurrent):
(WebCore::GLContext::unmakeContextCurrent):
(WebCore::GLContext::current):
(WebCore::GLContext::ScopedGLContext::ScopedGLContext):
(WebCore::GLContext::ScopedGLContext::~ScopedGLContext):
(WebCore::GLContext::ScopedGLContextCurrent::ScopedGLContextCurrent):
(WebCore::GLContext::ScopedGLContextCurrent::~ScopedGLContextCurrent):
(): Deleted.
* Source/WebCore/platform/graphics/egl/GLContext.h:
(WebCore::GLContext::display const): Deleted.
(WebCore::GLContext::config const): Deleted.
* Source/WebCore/platform/graphics/egl/GLContextWrapper.cpp: Added.
(WebCore::GLContextWrapper::~GLContextWrapper):
(WebCore::GLContextWrapper::currentContext):
(WebCore::GLContextWrapper::makeCurrent):
(WebCore::GLContextWrapper::unmakeCurrent):
* Source/WebCore/platform/graphics/egl/GLContextWrapper.h: Added.
* Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::makeContextCurrent):
(WebCore::GraphicsContextGLTextureMapperANGLE::makeCurrentImpl):
(WebCore::GraphicsContextGLTextureMapperANGLE::unmakeCurrentImpl):
* Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.h:

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