Lines Matching refs:surface

44 EGLAPI void EGLAPIENTRY eglBeginFrame(EGLDisplay dpy, EGLSurface surface);
224 EGLSurface surface = eglCreateWindowSurface(mEglDisplay, mEglConfig, window, attribs);
225 LOG_ALWAYS_FATAL_IF(surface == EGL_NO_SURFACE,
230 LOG_ALWAYS_FATAL_IF(eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED) == EGL_FALSE,
235 return surface;
238 void EglManager::destroySurface(EGLSurface surface) {
239 if (isCurrent(surface)) {
242 if (!eglDestroySurface(mEglDisplay, surface)) {
243 ALOGW("Failed to destroy surface %p, error=%s", (void*)surface, eglErrorString());
264 bool EglManager::makeCurrent(EGLSurface surface, EGLint* errOut) {
265 if (isCurrent(surface)) return false;
267 if (surface == EGL_NO_SURFACE) {
268 // Ensure we always have a valid surface & context
269 surface = mPBufferSurface;
271 if (!eglMakeCurrent(mEglDisplay, surface, surface, mEglContext)) {
274 ALOGW("Failed to make current on surface %p, error=%s",
275 (void*)surface, egl_error_str(*errOut));
277 LOG_ALWAYS_FATAL("Failed to make current on surface %p, error=%s",
278 (void*)surface, eglErrorString());
281 mCurrentSurface = surface;
288 EGLint EglManager::queryBufferAge(EGLSurface surface) {
296 eglQuerySurface(mEglDisplay, surface, EGL_BUFFER_AGE_EXT, &bufferAge);
302 Frame EglManager::beginFrame(EGLSurface surface) {
303 LOG_ALWAYS_FATAL_IF(surface == EGL_NO_SURFACE,
305 makeCurrent(surface);
307 frame.mSurface = surface;
308 eglQuerySurface(mEglDisplay, surface, EGL_WIDTH, &frame.mWidth);
309 eglQuerySurface(mEglDisplay, surface, EGL_HEIGHT, &frame.mHeight);
310 frame.mBufferAge = queryBufferAge(surface);
311 eglBeginFrame(mEglDisplay, surface);
321 LOG_ALWAYS_FATAL("Failed to set damage region on surface %p, error=%s",
349 // For some reason our surface was destroyed out from under us
351 // by just not trying to use the surface anymore
369 bool EglManager::setPreserveBuffer(EGLSurface surface, bool preserve) {
372 bool preserved = eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR,
375 ALOGW("Failed to set EGL_SWAP_BEHAVIOR on surface %p, error=%s",
376 (void*) surface, eglErrorString());
379 if (eglQuerySurface(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, &swapBehavior)) {
382 ALOGW("Failed to query EGL_SWAP_BEHAVIOR on surface %p, error=%p",
383 (void*) surface, eglErrorString());