cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8fb948bd469e00634de874b11f4262e7e292d8a6

commit 8fb948bd469e00634de874b11f4262e7e292d8a6
Author: Yury Usishchev <y.usishc...@samsung.com>
Date:   Fri Dec 20 14:02:48 2013 +0900

    evas: patched evas_map_image.c to use NEON code
    
    Reviewers: cedric, raster
    
    CC: cedric
    
    Differential Revision: https://phab.enlightenment.org/D397
    
    Signed-off-by: Cedric BAIL <cedric.b...@samsung.com>
---
 src/lib/evas/common/evas_map_image.c | 66 ++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/src/lib/evas/common/evas_map_image.c 
b/src/lib/evas/common/evas_map_image.c
index 95a034a..b41e5b9 100644
--- a/src/lib/evas/common/evas_map_image.c
+++ b/src/lib/evas/common/evas_map_image.c
@@ -641,6 +641,19 @@ evas_common_map_rgba_prepare(RGBA_Image *src, RGBA_Image 
*dst,
 #undef SCALE_USING_MMX
 #include "evas_map_image_internal.c"
 
+# ifdef BUILD_NEON
+#  undef FUNC_NAME
+#  undef FUNC_NAME_DO
+#  define FUNC_NAME _evas_common_map_rgba_internal_neon
+#  define FUNC_NAME_DO evas_common_map_rgba_internal_neon_do
+#  undef SCALE_USING_NEON
+#  define SCALE_USING_NEON
+#  undef SCALE_USING_MMX
+#  include "evas_map_image_internal.c"
+#  undef SCALE_USING_NEON
+#endif
+
+
 #ifdef BUILD_MMX
 void evas_common_map_rgba_internal_mmx(RGBA_Image *src, RGBA_Image *dst, 
RGBA_Draw_Context *dc, RGBA_Map_Point *p, int smooth, int level)
 {
@@ -697,6 +710,34 @@ void evas_common_map_rgba_internal(RGBA_Image *src, 
RGBA_Image *dst, RGBA_Draw_C
                                   p, smooth, level);
 }
 
+
+void evas_common_map_rgba_internal_neon(RGBA_Image *src, RGBA_Image *dst, 
RGBA_Draw_Context *dc, RGBA_Map_Point *p, int smooth, int level)
+{
+   int clip_x, clip_y, clip_w, clip_h;
+   DATA32 mul_col;
+
+   if (dc->clip.use)
+     {
+       clip_x = dc->clip.x;
+       clip_y = dc->clip.y;
+       clip_w = dc->clip.w;
+       clip_h = dc->clip.h;
+     }
+   else
+     {
+       clip_x = clip_y = 0;
+       clip_w = dst->cache_entry.w;
+       clip_h = dst->cache_entry.h;
+     }
+
+   mul_col = dc->mul.use ? dc->mul.col : 0xffffffff;
+
+   _evas_common_map_rgba_internal_neon(src, dst,
+                                  clip_x, clip_y, clip_w, clip_h,
+                                  mul_col, dc->render_op,
+                                  p, smooth, level);
+}
+
 EAPI void
 evas_common_map_rgba_cb(RGBA_Image *src, RGBA_Image *dst,
                         RGBA_Draw_Context *dc,
@@ -814,6 +855,11 @@ evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
      cb = evas_common_map_rgba_internal_mmx;
    else
 #endif
+#ifdef BUILD_NEON
+   if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
+     cb = evas_common_map_rgba_internal_neon;
+   else
+#endif
      cb = evas_common_map_rgba_internal;
 
    evas_common_map_rgba_cb(src, dst, dc, npoints, p, smooth, level, cb);
@@ -833,6 +879,14 @@ evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image 
*dst, int clip_x, int clip
                                         p, smooth, level);
    else
 #endif
+#ifdef BUILD_NEON
+   if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
+     _evas_common_map_rgba_internal_neon(src, dst,
+                                    clip_x, clip_y, clip_w, clip_h,
+                                    mul_col, render_op,
+                                    p, smooth, level);
+   else
+#endif
      _evas_common_map_rgba_internal(src, dst,
                                     clip_x, clip_y, clip_w, clip_h,
                                     mul_col, render_op,
@@ -871,6 +925,12 @@ evas_common_map_rgba_do(const Eina_Rectangle *clip,
                                                &spans->spans[0], smooth, 
level);
         else
 #endif
+#ifdef BUILD_NEON
+        if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
+          evas_common_map_rgba_internal_neon_do(src, dst, dc,
+                                           &spans->spans[0], smooth, level);
+        else
+#endif
           evas_common_map_rgba_internal_do(src, dst, dc,
                                            &spans->spans[0], smooth, level);
         return;
@@ -889,6 +949,12 @@ evas_common_map_rgba_do(const Eina_Rectangle *clip,
                                                &spans->spans[i], smooth, 
level);
         else
 #endif
+#ifdef BUILD_NEON
+        if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
+          evas_common_map_rgba_internal_neon_do(src, dst, dc,
+                                               &spans->spans[i], smooth, 
level);
+        else
+#endif
           evas_common_map_rgba_internal_do(src, dst, dc,
                                            &spans->spans[i], smooth, level);
      }

-- 


Reply via email to