Lines Matching refs:surface
38 EGLAPI void EGLAPIENTRY eglBeginFrame(EGLDisplay dpy, EGLSurface surface);
500 EGLSurface surface = eglCreateWindowSurface(mEglDisplay, config, window, attribs); in createSurface() local
501 if (surface == EGL_NO_SURFACE) { in createSurface()
506 LOG_ALWAYS_FATAL_IF(eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, in createSurface()
520 return surface; in createSurface()
523 void EglManager::destroySurface(EGLSurface surface) { in destroySurface() argument
524 if (isCurrent(surface)) { in destroySurface()
527 if (!eglDestroySurface(mEglDisplay, surface)) { in destroySurface()
528 ALOGW("Failed to destroy surface %p, error=%s", (void*)surface, eglErrorString()); in destroySurface()
549 bool EglManager::makeCurrent(EGLSurface surface, EGLint* errOut, bool force) { in makeCurrent() argument
550 if (!force && isCurrent(surface)) return false; in makeCurrent()
552 if (surface == EGL_NO_SURFACE) { in makeCurrent()
554 surface = mPBufferSurface; in makeCurrent()
556 if (!eglMakeCurrent(mEglDisplay, surface, surface, mEglContext)) { in makeCurrent()
559 ALOGW("Failed to make current on surface %p, error=%s", (void*)surface, in makeCurrent()
562 LOG_ALWAYS_FATAL("Failed to make current on surface %p, error=%s", (void*)surface, in makeCurrent()
566 mCurrentSurface = surface; in makeCurrent()
573 EGLint EglManager::queryBufferAge(EGLSurface surface) { in queryBufferAge() argument
581 eglQuerySurface(mEglDisplay, surface, EGL_BUFFER_AGE_EXT, &bufferAge); in queryBufferAge()
587 Frame EglManager::beginFrame(EGLSurface surface) { in beginFrame() argument
588 LOG_ALWAYS_FATAL_IF(surface == EGL_NO_SURFACE, "Tried to beginFrame on EGL_NO_SURFACE!"); in beginFrame()
589 makeCurrent(surface); in beginFrame()
591 frame.mSurface = surface; in beginFrame()
592 eglQuerySurface(mEglDisplay, surface, EGL_WIDTH, &frame.mWidth); in beginFrame()
593 eglQuerySurface(mEglDisplay, surface, EGL_HEIGHT, &frame.mHeight); in beginFrame()
594 frame.mBufferAge = queryBufferAge(surface); in beginFrame()
595 eglBeginFrame(mEglDisplay, surface); in beginFrame()
649 bool EglManager::setPreserveBuffer(EGLSurface surface, bool preserve) { in setPreserveBuffer() argument
652 bool preserved = eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, in setPreserveBuffer()
655 ALOGW("Failed to set EGL_SWAP_BEHAVIOR on surface %p, error=%s", (void*)surface, in setPreserveBuffer()
659 if (eglQuerySurface(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, &swapBehavior)) { in setPreserveBuffer()
662 ALOGW("Failed to query EGL_SWAP_BEHAVIOR on surface %p, error=%p", (void*)surface, in setPreserveBuffer()