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

Commit 07c6483e authored by Naveen Leekha's avatar Naveen Leekha Committed by Android Git Automerger
Browse files

am 03038725: am da7645d6: am 7fa5c04d: am c14a850f: am ea2afa46: Merge "Fix...

am 03038725: am da7645d6: am 7fa5c04d: am c14a850f: am ea2afa46: Merge "Fix parsing of extension string" into mnc-dev

* commit '03038725':
  Fix parsing of extension string
parents f74096ac 03038725
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@
 ** limitations under the License.
 */

#include <string>
#include <sstream>

#include <ctype.h>
#include <stdint.h>
#include <stdlib.h>
@@ -115,15 +118,11 @@ void egl_context_t::onMakeCurrent(EGLSurface draw, EGLSurface read) {
        }

        // tokenize the supported extensions for the glGetStringi() wrapper
        exts = gl_extensions.string();
        while (1) {
            const char *end = strchr(exts, ' ');
            if (end == NULL) {
                tokenized_gl_extensions.push(String8(exts));
                break;
            }
            tokenized_gl_extensions.push(String8(exts, end - exts));
            exts = end + 1;
        std::stringstream ss;
        std::string str;
        ss << gl_extensions.string();
        while (ss >> str) {
            tokenized_gl_extensions.push(String8(str.c_str()));
        }
    }
}