Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0999d283 authored by Jesse Hall's avatar Jesse Hall Committed by android-build-merger
Browse files

Merge "Handle glGetString returning NULL" am: 329904ff

am: cbd23648

Change-Id: I4760c13b20c4e8ac080ac6cc99840db670841aaf
parents 7437e047 cbd23648
Loading
Loading
Loading
Loading
+16 −10
Original line number Diff line number Diff line
@@ -116,6 +116,11 @@ void egl_context_t::onMakeCurrent(EGLSurface draw, EGLSurface read) {
    if (gl_extensions.empty()) {
        // call the implementation's glGetString(GL_EXTENSIONS)
        const char* exts = (const char *)gEGLImpl.hooks[version]->gl.glGetString(GL_EXTENSIONS);

        // If this context is sharing with another context, and the other context was reset
        // e.g. due to robustness failure, this context might also be reset and glGetString can
        // return NULL.
        if (exts) {
            gl_extensions = exts;
            if (gl_extensions.find("GL_EXT_debug_marker") == std::string::npos) {
                gl_extensions.insert(0, "GL_EXT_debug_marker ");
@@ -130,6 +135,7 @@ void egl_context_t::onMakeCurrent(EGLSurface draw, EGLSurface read) {
            }
        }
    }
}

// ----------------------------------------------------------------------------
}; // namespace android