Lines Matching defs:surface

29 EGLAPI void EGLAPIENTRY eglBeginFrame(EGLDisplay dpy, EGLSurface surface);
112 // We can't be certain about the state of the current surface (whether
114 // the pbuffer surface which we fully control
196 EGLSurface surface = eglCreateWindowSurface(mEglDisplay, mEglConfig, window, NULL);
197 LOG_ALWAYS_FATAL_IF(surface == EGL_NO_SURFACE,
200 return surface;
203 void EglManager::destroySurface(EGLSurface surface) {
204 if (isCurrent(surface)) {
207 if (!eglDestroySurface(mEglDisplay, surface)) {
208 ALOGW("Failed to destroy surface %p, error=%s", (void*)surface, egl_error_str());
233 bool EglManager::makeCurrent(EGLSurface surface) {
234 if (isCurrent(surface)) return false;
236 if (surface == EGL_NO_SURFACE) {
241 } else if (!eglMakeCurrent(mEglDisplay, surface, surface, mEglContext)) {
242 LOG_ALWAYS_FATAL("Failed to make current on surface %p, error=%s",
243 (void*)surface, egl_error_str());
245 mCurrentSurface = surface;
249 void EglManager::beginFrame(EGLSurface surface, EGLint* width, EGLint* height) {
250 LOG_ALWAYS_FATAL_IF(surface == EGL_NO_SURFACE,
252 makeCurrent(surface);
254 eglQuerySurface(mEglDisplay, surface, EGL_WIDTH, width);
257 eglQuerySurface(mEglDisplay, surface, EGL_HEIGHT, height);
259 eglBeginFrame(mEglDisplay, surface);
263 bool EglManager::swapBuffers(EGLSurface surface) {
265 eglSwapBuffers(mEglDisplay, surface);
271 // For some reason our surface was destroyed out from under us
273 // by just not trying to use the surface anymore
274 ALOGW("swapBuffers encountered EGL_BAD_SURFACE on %p, halting rendering...", surface);
287 bool EglManager::setPreserveBuffer(EGLSurface surface, bool preserve) {
292 preserved = eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR,
295 ALOGW("Failed to set EGL_SWAP_BEHAVIOR on surface %p, error=%s",
296 (void*) surface, egl_error_str());
302 if (eglQuerySurface(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, &swapBehavior)) {
305 ALOGW("Failed to query EGL_SWAP_BEHAVIOR on surface %p, error=%p",
306 (void*) surface, egl_error_str());