Lines Matching refs:surface
40 EGLAPI void EGLAPIENTRY eglBeginFrame(EGLDisplay dpy, EGLSurface surface);
345 EGLSurface surface = eglCreateWindowSurface( in createSurface() local
347 if (surface == EGL_NO_SURFACE) { in createSurface()
352 LOG_ALWAYS_FATAL_IF(eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, in createSurface()
358 return surface; in createSurface()
361 void EglManager::destroySurface(EGLSurface surface) { in destroySurface() argument
362 if (isCurrent(surface)) { in destroySurface()
365 if (!eglDestroySurface(mEglDisplay, surface)) { in destroySurface()
366 ALOGW("Failed to destroy surface %p, error=%s", (void*)surface, eglErrorString()); in destroySurface()
387 bool EglManager::makeCurrent(EGLSurface surface, EGLint* errOut, bool force) { in makeCurrent() argument
388 if (!force && isCurrent(surface)) return false; in makeCurrent()
390 if (surface == EGL_NO_SURFACE) { in makeCurrent()
392 surface = mPBufferSurface; in makeCurrent()
394 if (!eglMakeCurrent(mEglDisplay, surface, surface, mEglContext)) { in makeCurrent()
397 ALOGW("Failed to make current on surface %p, error=%s", (void*)surface, in makeCurrent()
400 LOG_ALWAYS_FATAL("Failed to make current on surface %p, error=%s", (void*)surface, in makeCurrent()
404 mCurrentSurface = surface; in makeCurrent()
411 EGLint EglManager::queryBufferAge(EGLSurface surface) { in queryBufferAge() argument
419 eglQuerySurface(mEglDisplay, surface, EGL_BUFFER_AGE_EXT, &bufferAge); in queryBufferAge()
425 Frame EglManager::beginFrame(EGLSurface surface) { in beginFrame() argument
426 LOG_ALWAYS_FATAL_IF(surface == EGL_NO_SURFACE, "Tried to beginFrame on EGL_NO_SURFACE!"); in beginFrame()
427 makeCurrent(surface); in beginFrame()
429 frame.mSurface = surface; in beginFrame()
430 eglQuerySurface(mEglDisplay, surface, EGL_WIDTH, &frame.mWidth); in beginFrame()
431 eglQuerySurface(mEglDisplay, surface, EGL_HEIGHT, &frame.mHeight); in beginFrame()
432 frame.mBufferAge = queryBufferAge(surface); in beginFrame()
433 eglBeginFrame(mEglDisplay, surface); in beginFrame()
487 bool EglManager::setPreserveBuffer(EGLSurface surface, bool preserve) { in setPreserveBuffer() argument
490 bool preserved = eglSurfaceAttrib(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, in setPreserveBuffer()
493 ALOGW("Failed to set EGL_SWAP_BEHAVIOR on surface %p, error=%s", (void*)surface, in setPreserveBuffer()
497 if (eglQuerySurface(mEglDisplay, surface, EGL_SWAP_BEHAVIOR, &swapBehavior)) { in setPreserveBuffer()
500 ALOGW("Failed to query EGL_SWAP_BEHAVIOR on surface %p, error=%p", (void*)surface, in setPreserveBuffer()