From: cedric Date: Thu, 22 Oct 2009 17:06:06 +0000 (+0000) Subject: * evas: Add map to SDL also. X-Git-Tag: 2.0_alpha~240^2~2242 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62bff1ba8282fa401a20624c40e61e330d7ce004;p=framework%2Fuifw%2Fevas.git * evas: Add map to SDL also. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@43206 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/modules/engines/software_16_sdl/evas_engine.c b/src/modules/engines/software_16_sdl/evas_engine.c index 76e5325..f215769 100644 --- a/src/modules/engines/software_16_sdl/evas_engine.c +++ b/src/modules/engines/software_16_sdl/evas_engine.c @@ -820,6 +820,11 @@ evas_engine_sdl16_image_draw(void *data __UNUSED__, void *context, void *surface } static void +evas_engine_sdl16_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map_Point *p, int smooth, int level) +{ +} + +static void evas_engine_sdl16_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) { } @@ -1072,6 +1077,7 @@ module_open(Evas_Module *em) ORD(image_border_set); ORD(image_border_get); ORD(image_draw); + ORD(image_map4_draw); ORD(image_cache_flush); ORD(image_cache_set); ORD(image_cache_get); diff --git a/src/modules/engines/software_sdl/evas_engine.c b/src/modules/engines/software_sdl/evas_engine.c index 97470ef..f519163 100644 --- a/src/modules/engines/software_sdl/evas_engine.c +++ b/src/modules/engines/software_sdl/evas_engine.c @@ -619,6 +619,40 @@ evas_engine_sdl_image_draw(void *data, void *context, void *surface, void *image } static void +evas_engine_sdl_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *image, RGBA_Map_Point *p, int smooth, int level) +{ + SDL_Engine_Image_Entry *eim = image; + SDL_Engine_Image_Entry *dst = surface; + int mustlock_im = 0; + int mustlock_dst = 0; + + if (!eim || !dst) return; + + if (SDL_MUSTLOCK(dst->surface)) + { + mustlock_dst = 1; + SDL_LockSurface(dst->surface); + _SDL_UPDATE_PIXELS(dst); + } + + if (eim->surface && SDL_MUSTLOCK(eim->surface)) + { + mustlock_im = 1; + SDL_LockSurface(eim->surface); + _SDL_UPDATE_PIXELS(eim); + } + + evas_common_map4_rgba(eim->cache_entry.src, dst->cache_entry.src, context, p, smooth, level); + evas_common_cpu_end_opt(); + + if (mustlock_im) + SDL_UnlockSurface(eim->surface); + + if (mustlock_dst) + SDL_UnlockSurface(dst->surface); +} + +static void evas_engine_sdl_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) { } @@ -860,6 +894,7 @@ static int module_open(Evas_Module *em) ORD(image_border_set); ORD(image_border_get); ORD(image_draw); + ORD(image_map4_draw); ORD(image_comment_get); ORD(image_format_get); ORD(image_cache_flush);