diff options
author | Joonbum Ko <joonbum.ko@samsung.com> | 2020-07-10 16:03:43 +0900 |
---|---|---|
committer | Joonbum Ko <joonbum.ko@samsung.com> | 2020-07-20 13:29:43 +0900 |
commit | ac9d2636d242a29707f92cea00f1ac22ecfb853f (patch) | |
tree | 5ecfb95b1a61918771c2d57ebf08fc2884f4e2ea | |
parent | 89c06bbe2bdcd694a71a172c5538faf4e9c7a092 (diff) | |
download | mesa-ac9d2636d242a29707f92cea00f1ac22ecfb853f.tar.gz mesa-ac9d2636d242a29707f92cea00f1ac22ecfb853f.tar.bz2 mesa-ac9d2636d242a29707f92cea00f1ac22ecfb853f.zip |
Implemented frontbuffer rendering mode.submit/tizen/20200720.053046accepted/tizen/unified/20200721.042546
Change-Id: I9b562a2b70eae9c1334fea0248906f84ba932e9f
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.h | 1 | ||||
-rwxr-xr-x | src/egl/drivers/dri2/platform_tizen.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index cb00a6d2503..cb08e797875 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -315,6 +315,7 @@ struct dri2_egl_surface __DRIimage *dri_image_back; __DRIimage *dri_image_front; + bool is_frontbuffer_mode; int buffer_count; bool valid; #endif diff --git a/src/egl/drivers/dri2/platform_tizen.c b/src/egl/drivers/dri2/platform_tizen.c index ca549baa490..a6f2b37d41d 100755 --- a/src/egl/drivers/dri2/platform_tizen.c +++ b/src/egl/drivers/dri2/platform_tizen.c @@ -234,6 +234,12 @@ tizen_window_enqueue_buffer_with_damage(_EGLDisplay *disp, 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, @@ -317,6 +323,7 @@ tizen_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type, 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) { @@ -393,6 +400,15 @@ tizen_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type, 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: |