From 1e82480c9a074163ec6788a8a60ead403f7b0658 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 23 Sep 2013 17:51:06 +0900 Subject: evas/cserve2: Use scalecache with cserve2 Let's reuse the logic from scalecache and call cserve2 functions when the scalecache should be used. So, now, cserve2 server will not scale any image... This is too computationally intensive for the server's main thread. This is not optimal but makes a hell of a lot more sense for the moment. (since cserve2 manages the SHM segments) --- .../evas/engines/software_generic/evas_engine.c | 54 ++++------------------ 1 file changed, 8 insertions(+), 46 deletions(-) (limited to 'src/modules') diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c index 577d3af4b0..57766ef34c 100644 --- a/src/modules/evas/engines/software_generic/evas_engine.c +++ b/src/modules/evas/engines/software_generic/evas_engine.c @@ -1352,52 +1352,14 @@ eng_image_draw(void *data EINA_UNUSED, void *context, void *surface, void *image #endif else { -#if 0 -#ifdef EVAS_CSERVE2 - if (evas_cserve2_use_get()) - { - evas_cache2_image_load_data(&im->cache_entry); - goto image_loaded; - } -#endif - if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache_image_load_data(&im->cache_entry); - evas_common_image_colorspace_normalize(im); - -image_loaded: -#endif -#ifdef EVAS_CSERVE2 - if (evas_cserve2_use_get()) - { - if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) - evas_cache2_image_load_data(&im->cache_entry); - - if (!im->cache_entry.flags.loaded) return EINA_FALSE; - evas_common_image_colorspace_normalize(im); - - if (smooth) - evas_common_scale_rgba_in_to_out_clip_smooth - (im, surface, context, - src_x, src_y, src_w, src_h, - dst_x, dst_y, dst_w, dst_h); - else - evas_common_scale_rgba_in_to_out_clip_sample - (im, surface, context, - src_x, src_y, src_w, src_h, - dst_x, dst_y, dst_w, dst_h); - } - else -#endif - { - evas_common_rgba_image_scalecache_prepare - (&im->cache_entry, surface, context, smooth, - src_x, src_y, src_w, src_h, - dst_x, dst_y, dst_w, dst_h); - evas_common_rgba_image_scalecache_do - (&im->cache_entry, surface, context, smooth, - src_x, src_y, src_w, src_h, - dst_x, dst_y, dst_w, dst_h); - } + evas_common_rgba_image_scalecache_prepare + (&im->cache_entry, surface, context, smooth, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h); + evas_common_rgba_image_scalecache_do + (&im->cache_entry, surface, context, smooth, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h); evas_common_cpu_end_opt(); } -- cgit v1.2.1