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

Changeset 277999 in webkit


Ignore:
Timestamp:
May 24, 2021, 11:22:41 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

GLContextEGL::swapBuffers() shouldn't do anything for Surfaceless contexts
​https://bugs.webkit.org/show_bug.cgi?id=226164

Patch by Zan Dobersek <​zdobersek@igalia.com> on 2021-05-24
Reviewed by Philippe Normand.

In case of a surfaceless GLContextEGL, the swapBuffers() method should
return early, avoiding an assert expecting a non-null EGLSurface (not
viable for surfaceless context) and a call to eglSwapBuffers(), which
on some drivers could still fail even when the surfaceless context
support is present and active.

  • platform/graphics/egl/GLContextEGL.cpp:

(WebCore::GLContextEGL::swapBuffers):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r277997 r277999  
     12021-05-24  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        GLContextEGL::swapBuffers() shouldn't do anything for Surfaceless contexts
     4        https://bugs.webkit.org/show_bug.cgi?id=226164
     5
     6        Reviewed by Philippe Normand.
     7
     8        In case of a surfaceless GLContextEGL, the swapBuffers() method should
     9        return early, avoiding an assert expecting a non-null EGLSurface (not
     10        viable for surfaceless context) and a call to eglSwapBuffers(), which
     11        on some drivers could still fail even when the surfaceless context
     12        support is present and active.
     13
     14        * platform/graphics/egl/GLContextEGL.cpp:
     15        (WebCore::GLContextEGL::swapBuffers):
     16
    1172021-05-24  Cathie Chen  <cathiechen@igalia.com>
    218
  • trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp

    r276070 r277999  
    478478void GLContextEGL::swapBuffers()
    479479{
     480    if (m_type == Surfaceless)
     481        return;
     482
    480483    ASSERT(m_surface);
    481484    eglSwapBuffers(m_display.eglDisplay(), m_surface);
Note: See TracChangeset for help on using the changeset viewer.