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

Commit 6abefb99 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "EGL: querying client extensions as well for EGL 1.5 extensions"

parents 63364ad9 b4c38593
Loading
Loading
Loading
Loading
+13 −2
Original line number Original line Diff line number Diff line
@@ -340,6 +340,17 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) {
            mVersionString = sVersionString15;
            mVersionString = sVersionString15;
            cnx->driverVersion = EGL_MAKE_VERSION(1, 5, 0);
            cnx->driverVersion = EGL_MAKE_VERSION(1, 5, 0);
        } else if ((cnx->major == 1) && (cnx->minor == 4)) {
        } else if ((cnx->major == 1) && (cnx->minor == 4)) {
            /* Querying extension strings for type Client */
            std::string typesExtString;
            static const char* clientExtensions =
                    cnx->egl.eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
            if (clientExtensions != nullptr && strlen(clientExtensions) > 0) {
                typesExtString.append(clientExtensions);
                typesExtString.append(" ");
            }

            /* Adding extension strings for type Display */
            typesExtString.append(disp.queryString.extensions);
            mVersionString = sVersionString14;
            mVersionString = sVersionString14;
            // Extensions needed for an EGL 1.4 implementation to be
            // Extensions needed for an EGL 1.4 implementation to be
            // able to support EGL 1.5 functionality
            // able to support EGL 1.5 functionality
@@ -356,9 +367,9 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) {
            };
            };
            bool extensionsFound = true;
            bool extensionsFound = true;
            for (const auto& name : egl15extensions) {
            for (const auto& name : egl15extensions) {
                extensionsFound &= findExtension(disp.queryString.extensions, name);
                extensionsFound &= findExtension(typesExtString.c_str(), name);
                ALOGV("Extension %s: %s", name,
                ALOGV("Extension %s: %s", name,
                      findExtension(disp.queryString.extensions, name) ? "Found" : "Missing");
                      findExtension(typesExtString.c_str(), name) ? "Found" : "Missing");
            }
            }
            // NOTE: From the spec:
            // NOTE: From the spec:
            // Creation of fence sync objects requires support from the bound
            // Creation of fence sync objects requires support from the bound