summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorYury Usishchev <y.usishchev@samsung.com>2013-12-20 14:02:48 +0900
committerCedric BAIL <cedric.bail@samsung.com>2013-12-20 15:10:09 +0900
commit8fb948bd469e00634de874b11f4262e7e292d8a6 (patch)
tree8d59f5c6c603d44ce549fef6084d9b5e1822a5bd /src/lib
parentb556df55af4418052d1f3270962bd3cb3cb84b41 (diff)
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.bail@samsung.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/evas/common/evas_map_image.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_map_image.c b/src/lib/evas/common/evas_map_image.c
index 95a034a701..b41e5b93a4 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,
641#undef SCALE_USING_MMX 641#undef SCALE_USING_MMX
642#include "evas_map_image_internal.c" 642#include "evas_map_image_internal.c"
643 643
644# ifdef BUILD_NEON
645# undef FUNC_NAME
646# undef FUNC_NAME_DO
647# define FUNC_NAME _evas_common_map_rgba_internal_neon
648# define FUNC_NAME_DO evas_common_map_rgba_internal_neon_do
649# undef SCALE_USING_NEON
650# define SCALE_USING_NEON
651# undef SCALE_USING_MMX
652# include "evas_map_image_internal.c"
653# undef SCALE_USING_NEON
654#endif
655
656
644#ifdef BUILD_MMX 657#ifdef BUILD_MMX
645void evas_common_map_rgba_internal_mmx(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map_Point *p, int smooth, int level) 658void evas_common_map_rgba_internal_mmx(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map_Point *p, int smooth, int level)
646{ 659{
@@ -697,6 +710,34 @@ void evas_common_map_rgba_internal(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_C
697 p, smooth, level); 710 p, smooth, level);
698} 711}
699 712
713
714void evas_common_map_rgba_internal_neon(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map_Point *p, int smooth, int level)
715{
716 int clip_x, clip_y, clip_w, clip_h;
717 DATA32 mul_col;
718
719 if (dc->clip.use)
720 {
721 clip_x = dc->clip.x;
722 clip_y = dc->clip.y;
723 clip_w = dc->clip.w;
724 clip_h = dc->clip.h;
725 }
726 else
727 {
728 clip_x = clip_y = 0;
729 clip_w = dst->cache_entry.w;
730 clip_h = dst->cache_entry.h;
731 }
732
733 mul_col = dc->mul.use ? dc->mul.col : 0xffffffff;
734
735 _evas_common_map_rgba_internal_neon(src, dst,
736 clip_x, clip_y, clip_w, clip_h,
737 mul_col, dc->render_op,
738 p, smooth, level);
739}
740
700EAPI void 741EAPI void
701evas_common_map_rgba_cb(RGBA_Image *src, RGBA_Image *dst, 742evas_common_map_rgba_cb(RGBA_Image *src, RGBA_Image *dst,
702 RGBA_Draw_Context *dc, 743 RGBA_Draw_Context *dc,
@@ -814,6 +855,11 @@ evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
814 cb = evas_common_map_rgba_internal_mmx; 855 cb = evas_common_map_rgba_internal_mmx;
815 else 856 else
816#endif 857#endif
858#ifdef BUILD_NEON
859 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
860 cb = evas_common_map_rgba_internal_neon;
861 else
862#endif
817 cb = evas_common_map_rgba_internal; 863 cb = evas_common_map_rgba_internal;
818 864
819 evas_common_map_rgba_cb(src, dst, dc, npoints, p, smooth, level, cb); 865 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
833 p, smooth, level); 879 p, smooth, level);
834 else 880 else
835#endif 881#endif
882#ifdef BUILD_NEON
883 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
884 _evas_common_map_rgba_internal_neon(src, dst,
885 clip_x, clip_y, clip_w, clip_h,
886 mul_col, render_op,
887 p, smooth, level);
888 else
889#endif
836 _evas_common_map_rgba_internal(src, dst, 890 _evas_common_map_rgba_internal(src, dst,
837 clip_x, clip_y, clip_w, clip_h, 891 clip_x, clip_y, clip_w, clip_h,
838 mul_col, render_op, 892 mul_col, render_op,
@@ -871,6 +925,12 @@ evas_common_map_rgba_do(const Eina_Rectangle *clip,
871 &spans->spans[0], smooth, level); 925 &spans->spans[0], smooth, level);
872 else 926 else
873#endif 927#endif
928#ifdef BUILD_NEON
929 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
930 evas_common_map_rgba_internal_neon_do(src, dst, dc,
931 &spans->spans[0], smooth, level);
932 else
933#endif
874 evas_common_map_rgba_internal_do(src, dst, dc, 934 evas_common_map_rgba_internal_do(src, dst, dc,
875 &spans->spans[0], smooth, level); 935 &spans->spans[0], smooth, level);
876 return; 936 return;
@@ -889,6 +949,12 @@ evas_common_map_rgba_do(const Eina_Rectangle *clip,
889 &spans->spans[i], smooth, level); 949 &spans->spans[i], smooth, level);
890 else 950 else
891#endif 951#endif
952#ifdef BUILD_NEON
953 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
954 evas_common_map_rgba_internal_neon_do(src, dst, dc,
955 &spans->spans[i], smooth, level);
956 else
957#endif
892 evas_common_map_rgba_internal_do(src, dst, dc, 958 evas_common_map_rgba_internal_do(src, dst, dc,
893 &spans->spans[i], smooth, level); 959 &spans->spans[i], smooth, level);
894 } 960 }