Changeset 263263 in webkit


Ignore:
Timestamp:
Jun 19, 2020 6:40:11 AM (4 years ago)
Author:
Lauro Moura
Message:

[WPE] Warn potential issues when creating WindowViewBackend
https://bugs.webkit.org/show_bug.cgi?id=213326

Reviewed by Philippe Normand.

Make it easier to debug eventual GL issues when starting up MiniBrowser in
windowed mode.

  • wpe/backends/WindowViewBackend.cpp:

(WPEToolingBackends::WaylandEGLConnection::singleton):
(WPEToolingBackends::WindowViewBackend::WindowViewBackend):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r263261 r263263  
     12020-06-19  Lauro Moura  <lmoura@igalia.com>
     2
     3        [WPE] Warn potential issues when creating WindowViewBackend
     4        https://bugs.webkit.org/show_bug.cgi?id=213326
     5
     6        Reviewed by Philippe Normand.
     7
     8        Make it easier to debug eventual GL issues when starting up MiniBrowser in
     9        windowed mode.
     10
     11        * wpe/backends/WindowViewBackend.cpp:
     12        (WPEToolingBackends::WaylandEGLConnection::singleton):
     13        (WPEToolingBackends::WindowViewBackend::WindowViewBackend):
     14
    1152020-06-19  Lauro Moura  <lmoura@igalia.com>
    216
  • trunk/Tools/wpe/backends/WindowViewBackend.cpp

    r261851 r263263  
    6060            [] {
    6161                s_connection.display = wl_display_connect(nullptr);
    62                 if (!s_connection.display)
     62                if (!s_connection.display) {
     63                    g_warning("WaylandEGLConnection: Could not connect to Wayland Display");
    6364                    return;
     65                }
    6466
    6567                EGLDisplay eglDisplay = eglGetDisplay(s_connection.display);
    66                 if (eglDisplay == EGL_NO_DISPLAY)
     68                if (eglDisplay == EGL_NO_DISPLAY) {
     69                    g_warning("WaylandEGLConnection: No EGL Display available in this connection");
    6770                    return;
    68 
    69                 if (!eglInitialize(eglDisplay, nullptr, nullptr) || !eglBindAPI(EGL_OPENGL_ES_API))
     71                }
     72
     73                if (!eglInitialize(eglDisplay, nullptr, nullptr) || !eglBindAPI(EGL_OPENGL_ES_API)) {
     74                    g_warning("WaylandEGLConnection: Failed to initialize and bind the EGL Display");
    7075                    return;
     76                }
    7177
    7278                s_connection.eglDisplay = eglDisplay;
     
    513519
    514520    auto& connection = WaylandEGLConnection::singleton();
    515     if (!connection.display)
     521    if (!connection.display) {
     522        g_warning("WindowViewBackend: No Wayland EGL connection available");
    516523        return;
    517 
    518     if (connection.eglDisplay == EGL_NO_DISPLAY || !initialize(connection.eglDisplay))
     524    }
     525
     526    if (connection.eglDisplay == EGL_NO_DISPLAY || !initialize(connection.eglDisplay)) {
     527        g_warning("WindowViewBackend: Could not initialize EGL display");
    519528        return;
     529    }
    520530
    521531    {
     
    564574        reinterpret_cast<PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC>(eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT"));
    565575    m_eglSurface = createPlatformWindowSurface(connection.eglDisplay, m_eglConfig, m_eglWindow, nullptr);
    566     if (!m_eglSurface)
     576    if (!m_eglSurface) {
     577        g_warning("WindowViewBackend: Could not create EGL platform window surface");
    567578        return;
    568 
    569     if (!eglMakeCurrent(connection.eglDisplay, m_eglSurface, m_eglSurface, m_eglContext))
     579    }
     580
     581    if (!eglMakeCurrent(connection.eglDisplay, m_eglSurface, m_eglSurface, m_eglContext)) {
     582        g_warning("WindowViewBackend: Could not make EGL surface current");
    570583        return;
     584    }
    571585
    572586    imageTargetTexture2DOES = reinterpret_cast<PFNGLEGLIMAGETARGETTEXTURE2DOESPROC>(eglGetProcAddress("glEGLImageTargetTexture2DOES"));
Note: See TracChangeset for help on using the changeset viewer.