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

Commit c8639351 authored by Jesse Hall's avatar Jesse Hall
Browse files

Generate new EGLExt class

Initially populated with EGL_ANDROID_presentation_time (moved from the
EGL14 class) and the ES-relevant parts of EGL_KHR_create_context.

Bug: 8678160
Change-Id: Ifed2ee3da264ca701ae1f4b309a0758f7fcc3acc
parent cc8f8ad3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ rm src/*.class
pushd out > /dev/null
mkdir classes
javac -d classes    android/opengl/EGL14.java \
                    android/opengl/EGLExt.java \
                    com/google/android/gles_jni/GLImpl.java \
                    javax/microedition/khronos/opengles/GL10.java \
                    javax/microedition/khronos/opengles/GL10Ext.java \
@@ -154,7 +155,7 @@ do
    compareGenerated ../../../../base/opengl/java/javax/microedition/khronos/opengles generated/javax/microedition/khronos/opengles $x
done

for x in EGL14 GLES10 GLES10Ext GLES11 GLES11Ext GLES20 GLES30
for x in EGL14 EGLExt GLES10 GLES10Ext GLES11 GLES11Ext GLES20 GLES30
do
    compareGenerated ../../../../base/opengl/java/android/opengl generated/android/opengl ${x}.java
    compareGenerated ../../../../base/core/jni generated/C android_opengl_${x}.cpp
+0 −1
Original line number Diff line number Diff line
@@ -31,4 +31,3 @@ EGLBoolean eglWaitGL ( void )
EGLBoolean eglWaitNative ( EGLint engine )
EGLBoolean eglSwapBuffers ( EGLDisplay dpy, EGLSurface surface )
EGLBoolean eglCopyBuffers ( EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target )
EGLBoolean eglPresentationTimeANDROID ( EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time )
+1 −0
Original line number Diff line number Diff line
EGLBoolean eglPresentationTimeANDROID ( EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time )
+21 −21
Original line number Diff line number Diff line
@@ -84,26 +84,26 @@ public class GenerateEGL {
        ParameterChecker checker = new ParameterChecker(checksReader);


        BufferedReader specReader =
                new BufferedReader(new FileReader("specs/egl/EGL14.spec"));

        String egljFilename = "android/opengl/EGL14.java";
        String eglcFilename = "android_opengl_EGL14.cpp";
        for(String suffix: new String[] {"EGL14", "EGLExt"}) {
            BufferedReader specReader = new BufferedReader(new FileReader(
                    "specs/egl/" + suffix + ".spec"));
            String egljFilename = "android/opengl/" + suffix + ".java";
            String eglcFilename = "android_opengl_" + suffix + ".cpp";
            PrintStream egljStream =
                new PrintStream(new FileOutputStream("out/" + egljFilename));
            PrintStream eglcStream =
                new PrintStream(new FileOutputStream("out/" + eglcFilename));
        egljStream.println("/*");
        eglcStream.println("/*");
        copy("stubs/egl/EGL14Header.java-if", egljStream);
        copy("stubs/egl/EGL14cHeader.cpp", eglcStream);
            copy("stubs/egl/" + suffix + "Header.java-if", egljStream);
            copy("stubs/egl/" + suffix + "cHeader.cpp", eglcStream);
            EGLCodeEmitter emitter = new EGLCodeEmitter(
                "android/opengl/EGL14",
                    "android/opengl/" + suffix,
                    checker, egljStream, eglcStream);
            emit(emitter, specReader, egljStream, eglcStream);
        emitter.emitNativeRegistration("register_android_opengl_jni_EGL14");
            emitter.emitNativeRegistration(
                    "register_android_opengl_jni_" + suffix);
            egljStream.println("}");
            egljStream.close();
            eglcStream.close();
        }
    }
}
+1 −1
Original line number Diff line number Diff line
**
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
Loading