Search in sources :

Example 26 with EGLSurface

use of javax.microedition.khronos.egl.EGLSurface in project android_frameworks_base by crdroidandroid.

the class EGLLogWrapper method eglGetCurrentSurface.

public EGLSurface eglGetCurrentSurface(int readdraw) {
    begin("eglGetCurrentSurface");
    arg("readdraw", readdraw);
    end();
    EGLSurface result = mEgl10.eglGetCurrentSurface(readdraw);
    returns(result);
    checkError();
    return result;
}
Also used : EGLSurface(javax.microedition.khronos.egl.EGLSurface)

Example 27 with EGLSurface

use of javax.microedition.khronos.egl.EGLSurface in project android_frameworks_base by crdroidandroid.

the class EGLLogWrapper method eglCreateWindowSurface.

public EGLSurface eglCreateWindowSurface(EGLDisplay display, EGLConfig config, Object native_window, int[] attrib_list) {
    begin("eglCreateWindowSurface");
    arg("display", display);
    arg("config", config);
    arg("native_window", native_window);
    arg("attrib_list", attrib_list);
    end();
    EGLSurface result = mEgl10.eglCreateWindowSurface(display, config, native_window, attrib_list);
    returns(result);
    checkError();
    return result;
}
Also used : EGLSurface(javax.microedition.khronos.egl.EGLSurface)

Example 28 with EGLSurface

use of javax.microedition.khronos.egl.EGLSurface in project android_frameworks_base by crdroidandroid.

the class RenderTarget method forSurfaceTexture.

@TargetApi(11)
public RenderTarget forSurfaceTexture(SurfaceTexture surfaceTexture) {
    EGLConfig eglConfig = chooseEglConfig(mEgl, mDisplay);
    EGLSurface eglSurf = null;
    synchronized (mSurfaceSources) {
        eglSurf = mSurfaceSources.get(surfaceTexture);
        if (eglSurf == null) {
            eglSurf = mEgl.eglCreateWindowSurface(mDisplay, eglConfig, surfaceTexture, null);
            mSurfaceSources.put(surfaceTexture, eglSurf);
        }
    }
    checkEglError(mEgl, "eglCreateWindowSurface");
    checkSurface(mEgl, eglSurf);
    RenderTarget result = new RenderTarget(mDisplay, mContext, eglSurf, 0, false, true);
    result.setSurfaceSource(surfaceTexture);
    result.addReferenceTo(eglSurf);
    return result;
}
Also used : EGLSurface(javax.microedition.khronos.egl.EGLSurface) EGLConfig(javax.microedition.khronos.egl.EGLConfig) TargetApi(android.annotation.TargetApi)

Example 29 with EGLSurface

use of javax.microedition.khronos.egl.EGLSurface in project android_frameworks_base by crdroidandroid.

the class RenderTarget method forSurfaceHolder.

public RenderTarget forSurfaceHolder(SurfaceHolder surfaceHolder) {
    EGLConfig eglConfig = chooseEglConfig(mEgl, mDisplay);
    EGLSurface eglSurf = null;
    synchronized (mSurfaceSources) {
        eglSurf = mSurfaceSources.get(surfaceHolder);
        if (eglSurf == null) {
            eglSurf = mEgl.eglCreateWindowSurface(mDisplay, eglConfig, surfaceHolder, null);
            mSurfaceSources.put(surfaceHolder, eglSurf);
        }
    }
    checkEglError(mEgl, "eglCreateWindowSurface");
    checkSurface(mEgl, eglSurf);
    RenderTarget result = new RenderTarget(mDisplay, mContext, eglSurf, 0, false, true);
    result.addReferenceTo(eglSurf);
    result.setSurfaceSource(surfaceHolder);
    return result;
}
Also used : EGLSurface(javax.microedition.khronos.egl.EGLSurface) EGLConfig(javax.microedition.khronos.egl.EGLConfig)

Example 30 with EGLSurface

use of javax.microedition.khronos.egl.EGLSurface in project android_frameworks_base by crdroidandroid.

the class RenderTarget method forSurface.

@TargetApi(11)
public RenderTarget forSurface(Surface surface) {
    EGLConfig eglConfig = chooseEglConfig(mEgl, mDisplay);
    EGLSurface eglSurf = null;
    synchronized (mSurfaceSources) {
        eglSurf = mSurfaceSources.get(surface);
        if (eglSurf == null) {
            eglSurf = mEgl.eglCreateWindowSurface(mDisplay, eglConfig, surface, null);
            mSurfaceSources.put(surface, eglSurf);
        }
    }
    checkEglError(mEgl, "eglCreateWindowSurface");
    checkSurface(mEgl, eglSurf);
    RenderTarget result = new RenderTarget(mDisplay, mContext, eglSurf, 0, false, true);
    result.setSurfaceSource(surface);
    result.addReferenceTo(eglSurf);
    return result;
}
Also used : EGLSurface(javax.microedition.khronos.egl.EGLSurface) EGLConfig(javax.microedition.khronos.egl.EGLConfig) TargetApi(android.annotation.TargetApi)

Aggregations

EGLSurface (javax.microedition.khronos.egl.EGLSurface)48 EGLConfig (javax.microedition.khronos.egl.EGLConfig)20 TargetApi (android.annotation.TargetApi)8 EGL10 (javax.microedition.khronos.egl.EGL10)8 EGLContext (javax.microedition.khronos.egl.EGLContext)8 EGLDisplay (javax.microedition.khronos.egl.EGLDisplay)8