mtx_unlock(&disp->Mutex);
fence_fd = dri2_surf->out_fence_fd;
+
+ if (fence_fd >= 0 && dri2_surf->is_frontbuffer_mode) {
+ close(fence_fd);
+ fence_fd = -1;
+ }
+
dri2_surf->out_fence_fd = -1;
ret = tpl_surface_enqueue_buffer_with_damage_and_sync(dri2_surf->tpl_surface,
const __DRIconfig *config;
tpl_surface_type_t tpl_surf_type = TPL_SURFACE_ERROR;
tpl_result_t ret = TPL_ERROR_INVALID_PARAMETER;
+ char *env = getenv("EGL_FRONTBUFFER_ENABLE");
dri2_surf = calloc(1, sizeof *dri2_surf);
if (!dri2_surf) {
goto cleanup_tpl_surface;
}
+ dri2_surf->is_frontbuffer_mode = EGL_FALSE;
+ if (env != NULL && atoi(env))
+ {
+ tpl_result_t tpl_result = TPL_ERROR_NONE;
+ tpl_result = tpl_surface_set_frontbuffer_mode(dri2_surf->tpl_surface, TPL_TRUE);
+ if (tpl_result == TPL_ERROR_NONE)
+ dri2_surf->is_frontbuffer_mode = EGL_TRUE;
+ }
+
return &dri2_surf->base;
cleanup_tpl_surface: