diff options
-rwxr-xr-x | src/egl/drivers/dri2/platform_tizen.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/platform_tizen.c b/src/egl/drivers/dri2/platform_tizen.c index 9cdc86f8140..a3ba349a2f6 100755 --- a/src/egl/drivers/dri2/platform_tizen.c +++ b/src/egl/drivers/dri2/platform_tizen.c @@ -1327,6 +1327,12 @@ tizen_swrast_put_image2(__DRIdrawable * draw, int op, } tbm_surface_unmap(dri2_surf->tbm_surface); + tpl_surface_enqueue_buffer_with_damage_and_sync(dri2_surf->tpl_surface, + dri2_surf->tbm_surface, + 0, NULL, -1); + tbm_surface_internal_unref(dri2_surf->tbm_surface); + dri2_surf->tbm_surface = NULL; + dri2_surf->back = NULL; } } @@ -1512,6 +1518,27 @@ static const __DRIextension *tizen_swrast_loader_extensions[] = { NULL, }; +static EGLBoolean +tizen_swrast_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw) +{ + struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); + struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw); + + dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable); + return EGL_TRUE; +} + +static const struct dri2_egl_display_vtbl tizen_swrast_display_vtbl = { + .authenticate = NULL, + .create_window_surface = tizen_create_window_surface, + .create_pixmap_surface = tizen_create_pixmap_surface, + .create_pbuffer_surface = tizen_create_pbuffer_surface, + .destroy_surface = tizen_destroy_surface, + .create_image = tizen_create_image_khr, + .swap_buffers = tizen_swrast_swap_buffers, + .get_dri_drawable = dri2_surface_get_dri_drawable, +}; + EGLBoolean dri2_initialize_tizen(_EGLDisplay *disp) { @@ -1691,7 +1718,10 @@ dri2_initialize_tizen(_EGLDisplay *disp) /* Fill vtbl last to prevent accidentally calling virtual function during * initialization. */ - dri2_dpy->vtbl = &tizen_display_vtbl; + if (hw_accel) + dri2_dpy->vtbl = &tizen_display_vtbl; + else + dri2_dpy->vtbl = &tizen_swrast_display_vtbl; disp->Extensions.EXT_buffer_age = EGL_FALSE; disp->Extensions.EXT_swap_buffers_with_damage = EGL_FALSE; /*disable partial buffer swap*/ |