diff options
author | Joonbum Ko <joonbum.ko@samsung.com> | 2018-07-24 16:11:05 +0900 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2019-04-08 23:00:54 +0800 |
commit | 70377ab6fcdbf48bd1eaa5c18e92d4587c50776e (patch) | |
tree | 4f621b0f89049df2db1f7edda84c905624dee17b | |
parent | 8bdd1e03c0960945dffbdbeb67fe734fe92c2e0b (diff) | |
download | mesa-70377ab6fcdbf48bd1eaa5c18e92d4587c50776e.tar.gz mesa-70377ab6fcdbf48bd1eaa5c18e92d4587c50776e.tar.bz2 mesa-70377ab6fcdbf48bd1eaa5c18e92d4587c50776e.zip |
platform_tizen: Fixed some build errors for supporting latest upstream code.
Change-Id: Ie4c4d957da63d73c82ab41a91ae24ec589ecf4ed
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
-rw-r--r-- | docs/egl.html | 2 | ||||
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 5 | ||||
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.h | 2 | ||||
-rw-r--r-- | src/egl/drivers/dri2/platform_tizen.c | 21 |
4 files changed, 24 insertions, 6 deletions
diff --git a/docs/egl.html b/docs/egl.html index 2bc8f237272..99058cde1da 100644 --- a/docs/egl.html +++ b/docs/egl.html @@ -87,7 +87,7 @@ the main library to decide the native platform.</p> <p>The available platforms are <code>x11</code>, <code>drm</code>, <code>wayland</code>, <code>surfaceless</code>, <code>android</code>, -and <code>haiku</code>. +<code>tizen</code>, and <code>haiku</code>. The <code>android</code> platform can either be built as a system component, part of AOSP, using <code>Android.mk</code> files, or cross-compiled using appropriate <code>configure</code> options. diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 45433cd87b1..5cf3092403f 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -121,6 +121,11 @@ dri_is_thread_safe(void *loaderPrivate) return true; #endif +#ifdef HAVE_TIZEN_PLATFORM + if (display->Platform == _EGL_PLATFORM_TIZEN) + return true; +#endif + return true; } diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 4f9f9423a8f..99617a6a9e4 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -323,6 +323,8 @@ struct dri2_egl_surface tbm_surface_h tbm_surface; int age; } color_buffers[3], *back; + + int buffer_count; #endif #if defined(HAVE_WAYLAND_PLATFORM) || defined(HAVE_DRM_PLATFORM) diff --git a/src/egl/drivers/dri2/platform_tizen.c b/src/egl/drivers/dri2/platform_tizen.c index 4b5b8bd6634..30d12cb4565 100644 --- a/src/egl/drivers/dri2/platform_tizen.c +++ b/src/egl/drivers/dri2/platform_tizen.c @@ -882,10 +882,7 @@ tizen_create_image_from_name(_EGLDisplay *disp, _EGLContext *ctx, return NULL; } - if (!_eglInitImage(&dri2_img->base, disp)) { - free(dri2_img); - return NULL; - } + _eglInitImage(&dri2_img->base, disp); dri2_img->dri_image = dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen, @@ -1250,6 +1247,20 @@ tizen_add_configs(_EGLDriver *drv, _EGLDisplay *dpy) return (count != 0); } +static EGLBoolean tizen_set_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy, + _EGLSurface *surf, EGLint interval) +{ + tpl_result_t res = TPL_ERROR_NONE; + struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf); + + res = tpl_surface_set_post_interval(dri2_surf->tpl_surface, interval); + + if (res != TPL_ERROR_NONE) + return EGL_FALSE; + + return EGL_TRUE; +} + static struct dri2_egl_display_vtbl tizen_display_vtbl = { .authenticate = NULL, .create_window_surface = tizen_create_window_surface, @@ -1257,7 +1268,7 @@ static struct dri2_egl_display_vtbl tizen_display_vtbl = { .create_pbuffer_surface = tizen_create_pbuffer_surface, .destroy_surface = tizen_destroy_surface, .create_image = tizen_create_image_khr, - .swap_interval = dri2_fallback_swap_interval, + .swap_interval = tizen_set_swap_interval, .swap_buffers = tizen_swap_buffers, .swap_buffers_with_damage = tizen_swap_buffers_with_damage, .swap_buffers_region = dri2_fallback_swap_buffers_region, |