summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/wayland_shm/evas_engine.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-03-09 16:18:34 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-03-15 11:11:59 +0900
commit20b4d9dd6adb88f9dd0cd51fa849f0c360432279 (patch)
treea98d6dc1d361e843cb74fd363ecbc52b73975b05 /src/modules/evas/engines/wayland_shm/evas_engine.c
parenta58a3532e3e8e890b8cde0ef6d2610466beebd25 (diff)
Evas engines: Add internal functions for native images
- image_native_init - image_native_shutdown init() will be used to test whether the engine supports a certain type of native image. Note: Native image support is very much dependent on the engine, and some stuff like opengl should work everywhere (even in sw with osmesa) but that's not the case.
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c
index 5f1f78aab9..adf33f68b0 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -265,6 +265,33 @@ eng_output_resize(void *data, int w, int h)
265 re->generic.h = h; 265 re->generic.h = h;
266} 266}
267 267
268static int
269eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type)
270{
271 switch (type)
272 {
273 case EVAS_NATIVE_SURFACE_TBM:
274 return _evas_native_tbm_init();
275 default:
276 ERR("Native surface type %d not supported!", type);
277 return 0;
278 }
279}
280
281static void
282eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type)
283{
284 switch (type)
285 {
286 case EVAS_NATIVE_SURFACE_TBM:
287 _evas_native_tbm_shutdown();
288 return;
289 default:
290 ERR("Native surface type %d not supported!", type);
291 return;
292 }
293}
294
268static void * 295static void *
269eng_image_native_set(void *data EINA_UNUSED, void *image, void *native) 296eng_image_native_set(void *data EINA_UNUSED, void *image, void *native)
270{ 297{
@@ -287,6 +314,8 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native)
287 } 314 }
288 } 315 }
289 316
317 /* FIXME: WTF is this? OPENGL supported here? uh? and x11.visual used???
318 * It looks like this code needs to fail and return NULL. */
290 if ((ns->type == EVAS_NATIVE_SURFACE_OPENGL) && 319 if ((ns->type == EVAS_NATIVE_SURFACE_OPENGL) &&
291 (ns->version == EVAS_NATIVE_SURFACE_VERSION)) 320 (ns->version == EVAS_NATIVE_SURFACE_VERSION))
292 im2 = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), 321 im2 = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),