⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287075 in webkit


Ignore:
Timestamp:
Dec 15, 2021, 8:33:45 AM (5 years ago)
Author:
Chris Lord
Message:

[GTK] Use libgbm and the ANGLE gbm backend to fix initialisation
https://bugs.webkit.org/show_bug.cgi?id=234293

Reviewed by Don Olmstead.

.:

Add cmake files to find gbm and libdrm.

  • Source/cmake/FindGBM.cmake: Added.
  • Source/cmake/FindLibDRM.cmake: Added.

Source/ThirdParty/ANGLE:

Use GBM backend for GTK platform.

  • CMakeLists.txt:
  • GL.cmake:
  • PlatformGTK.cmake:

Source/WebCore:

Make ANGLE context non-TEXTURE_2D drawingBufferTextureTarget Cocoa-specific.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::drawingBufferTextureTarget):

Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r286910 r287075  
     12021-12-15  Chris Lord  <clord@igalia.com>
     2
     3        [GTK] Use libgbm and the ANGLE gbm backend to fix initialisation
     4        https://bugs.webkit.org/show_bug.cgi?id=234293
     5
     6        Reviewed by Don Olmstead.
     7
     8        Add cmake files to find gbm and libdrm.
     9
     10        * Source/cmake/FindGBM.cmake: Added.
     11        * Source/cmake/FindLibDRM.cmake: Added.
     12
    1132021-12-11  Aakash Jain  <aakash_jain@apple.com>
    214
  • trunk/Source/ThirdParty/ANGLE/CMakeLists.txt

    r286659 r287075  
    1010elseif (UNIX)
    1111    set(is_linux TRUE)
    12     if (ENABLE_X11_TARGET)
    13         set(angle_use_x11 TRUE)
    14     endif ()
     12    set(ozone_platform_gbm TRUE)
    1513endif ()
    1614
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r287068 r287075  
     12021-12-15  Chris Lord  <clord@igalia.com>
     2
     3        [GTK] Use libgbm and the ANGLE gbm backend to fix initialisation
     4        https://bugs.webkit.org/show_bug.cgi?id=234293
     5
     6        Reviewed by Don Olmstead.
     7
     8        Use GBM backend for GTK platform.
     9
     10        * CMakeLists.txt:
     11        * GL.cmake:
     12        * PlatformGTK.cmake:
     13
    1142021-12-15  Kyle Piddington  <kpiddington@apple.com>
    215
  • trunk/Source/ThirdParty/ANGLE/GL.cmake

    r287068 r287075  
    164164        "src/libANGLE/renderer/gl/egl/gbm/SurfaceGbm.h"
    165165    )
    166 
    167     pkg_config("src/libANGLE/renderer/gl/libdrm")
    168     set(packages "src/libANGLE/renderer/gl/libdrm" )
    169166endif()
    170167
  • trunk/Source/ThirdParty/ANGLE/PlatformGTK.cmake

    r286978 r287075  
    2323    list(APPEND ANGLE_DEFINITIONS
    2424        ANGLE_ENABLE_OPENGL
     25        ANGLE_USE_GBM
     26        USE_SYSTEM_EGL
     27    )
     28
     29    find_package(LibDRM REQUIRED)
     30    find_package(GBM REQUIRED)
     31
     32    list(APPEND ANGLE_PRIVATE_INCLUDE_DIRECTORIES
     33        ${LIBDRM_INCLUDE_DIR}
     34        {GBM_INCLUDE_DIR}
    2535    )
    2636
    2737    list(APPEND ANGLEGLESv2_LIBRARIES
    2838        ${CMAKE_DL_LIBS}
     39        ${LIBDRM_LIBRARIES}
     40        ${GBM_LIBRARIES}
    2941        Threads::Threads
    3042    )
     
    3547        list(APPEND ANGLEGLESv2_LIBRARIES OpenGL::GLES)
    3648    endif ()
    37 
    38     # NOTE: When both Wayland and X11 are enabled, ANGLE_USE_X11 will be
    39     # defined and the X11 type definitions will be used for code involving
    40     # both. That works because types for both Wayland and X11 have the same
    41     # sizes and the code in WebKit casts the values to the proper types as
    42     # needed.
    43     set(GTK_ANGLE_DEFINITIONS)
    44 
    45     if (ENABLE_X11_TARGET)
    46         list(APPEND ANGLE_SOURCES ${libangle_gl_glx_sources})
    47         list(APPEND ANGLEGLESv2_LIBRARIES X11)
    48         list(APPEND GTK_ANGLE_DEFINITIONS ANGLE_USE_X11)
    49     endif ()
    50 
    51     # Allow building ANGLE on platforms which may not provide X11 headers.
    52     if (NOT GTK_ANGLE_DEFINITIONS)
    53         list(APPEND GTK_ANGLE_DEFINITIONS USE_SYSTEM_EGL)
    54     endif ()
    55 
    56     list(APPEND ANGLE_DEFINITIONS ${GTK_ANGLE_DEFINITIONS})
    5749endif ()
  • trunk/Source/WebCore/ChangeLog

    r287071 r287075  
     12021-12-15  Chris Lord  <clord@igalia.com>
     2
     3        [GTK] Use libgbm and the ANGLE gbm backend to fix initialisation
     4        https://bugs.webkit.org/show_bug.cgi?id=234293
     5
     6        Reviewed by Don Olmstead.
     7
     8        Make ANGLE context non-TEXTURE_2D drawingBufferTextureTarget Cocoa-specific.
     9
     10        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
     11        (WebCore::GraphicsContextGLANGLE::drawingBufferTextureTarget):
     12
    1132021-12-15  Carlos Garcia Campos  <cgarcia@igalia.com>
    214
  • trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp

    r286603 r287075  
    7474GCGLenum GraphicsContextGLANGLE::drawingBufferTextureTarget()
    7575{
    76 #if PLATFORM(WIN)
     76#if !PLATFORM(COCOA)
    7777    m_drawingBufferTextureTarget = EGL_TEXTURE_2D;
    7878#else
Note: See TracChangeset for help on using the changeset viewer.