use of javax.microedition.khronos.egl.EGLSurface in project platform_frameworks_base by android.
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;
}
use of javax.microedition.khronos.egl.EGLSurface in project platform_frameworks_base by android.
the class EGLLogWrapper method eglCreatePixmapSurface.
public EGLSurface eglCreatePixmapSurface(EGLDisplay display, EGLConfig config, Object native_pixmap, int[] attrib_list) {
begin("eglCreatePixmapSurface");
arg("display", display);
arg("config", config);
arg("native_pixmap", native_pixmap);
arg("attrib_list", attrib_list);
end();
EGLSurface result = mEgl10.eglCreatePixmapSurface(display, config, native_pixmap, attrib_list);
returns(result);
checkError();
return result;
}
use of javax.microedition.khronos.egl.EGLSurface in project platform_frameworks_base by android.
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;
}
use of javax.microedition.khronos.egl.EGLSurface in project platform_frameworks_base by android.
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;
}
use of javax.microedition.khronos.egl.EGLSurface in project platform_frameworks_base by android.
the class RenderTarget method newTarget.
public static RenderTarget newTarget(int width, int height) {
EGL10 egl = (EGL10) EGLContext.getEGL();
EGLDisplay eglDisplay = createDefaultDisplay(egl);
EGLConfig eglConfig = chooseEglConfig(egl, eglDisplay);
EGLContext eglContext = createContext(egl, eglDisplay, eglConfig);
EGLSurface eglSurface = createSurface(egl, eglDisplay, width, height);
RenderTarget result = new RenderTarget(eglDisplay, eglContext, eglSurface, 0, true, true);
result.addReferenceTo(eglSurface);
return result;
}
Aggregations