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

Commit 1296c63b authored by Jeff Brown's avatar Jeff Brown
Browse files

Enable use of Surface as a native window in EGL14 wrapper.

Change-Id: Ia3546fd02f9b60d4505fbc0602522b95e3e5b6be
parent 5d728bb9
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -248,6 +248,8 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
        } else if (win instanceof SurfaceHolder) {
        } else if (win instanceof SurfaceHolder) {
            SurfaceHolder holder = (SurfaceHolder)win;
            SurfaceHolder holder = (SurfaceHolder)win;
            sur = holder.getSurface();
            sur = holder.getSurface();
        } else if (win instanceof Surface) {
            sur = (Surface) win;
        }
        }


        EGLSurface surface;
        EGLSurface surface;
@@ -259,7 +261,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
        } else {
        } else {
            throw new java.lang.UnsupportedOperationException(
            throw new java.lang.UnsupportedOperationException(
                "eglCreateWindowSurface() can only be called with an instance of " +
                "eglCreateWindowSurface() can only be called with an instance of " +
                "SurfaceView, SurfaceTexture or SurfaceHolder at the moment, " +
                "Surface, SurfaceView, SurfaceTexture or SurfaceHolder at the moment, " +
                "this will be fixed later.");
                "this will be fixed later.");
        }
        }