summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/engines/common/evas_draw_main.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2004-05-26 02:45:40 +0000
committerCarsten Haitzler <raster@rasterman.com>2004-05-26 02:45:40 +0000
commit8c29c3d42b364ca3a57151c3f5bce0bef111e5bf (patch)
tree87b088b2c55914b621f28511dbec35a4e9bce7a8 /legacy/evas/src/lib/engines/common/evas_draw_main.c
parent1d3f35c515e2e19e4d2ed9d736b21e8810085889 (diff)
use mmx2 routines if we can - they are faster! (almost 3 times)
SVN revision: 10361
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_draw_main.c106
1 files changed, 92 insertions, 14 deletions
diff --git a/legacy/evas/src/lib/engines/common/evas_draw_main.c b/legacy/evas/src/lib/engines/common/evas_draw_main.c
index 4ddae27719..2161954a0e 100644
--- a/legacy/evas/src/lib/engines/common/evas_draw_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_draw_main.c
@@ -532,7 +532,42 @@ evas_common_draw_func_blend_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
532 } 532 }
533 else 533 else
534 { 534 {
535#ifdef BUILD_SSE 535#if 1
536
537# ifdef BUILD_MMX
538# ifdef BUILD_C
539 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2))
540# endif
541 return evas_common_copy_pixels_rgba_to_rgba_mmx2;
542# ifdef BUILD_SSE
543 else
544# endif
545#endif
546#ifdef BUILD_SSE
547# ifdef BUILD_C
548 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64))
549# endif
550 return evas_common_copy_pixels_rgba_to_rgba_sse;
551# ifdef BUILD_MMX
552 else
553# endif
554#endif
555#ifdef BUILD_MMX
556# ifdef BUILD_C
557 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
558# endif
559 return evas_common_copy_pixels_rgba_to_rgba_mmx;
560# ifdef BUILD_C
561 else
562# endif
563#endif
564#ifdef BUILD_C
565 return evas_common_copy_pixels_rgba_to_rgba_c;
566#endif
567
568#else
569
570# ifdef BUILD_SSE
536 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) 571 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256))
537 return evas_common_copy_pixels_rgba_to_rgba_sse; 572 return evas_common_copy_pixels_rgba_to_rgba_sse;
538# ifdef BUILD_MMX 573# ifdef BUILD_MMX
@@ -554,6 +589,8 @@ evas_common_draw_func_blend_get(RGBA_Image *src, RGBA_Image *dst, int pixels)
554#endif 589#endif
555#ifdef BUILD_C 590#ifdef BUILD_C
556 return evas_common_copy_pixels_rgba_to_rgba_c; 591 return evas_common_copy_pixels_rgba_to_rgba_c;
592#endif
593
557#endif 594#endif
558 } 595 }
559 } 596 }
@@ -596,7 +633,7 @@ evas_common_draw_func_blend_color_get(DATA32 src, RGBA_Image *dst, int pixels)
596 else 633 else
597 { 634 {
598#ifdef BUILD_SSE 635#ifdef BUILD_SSE
599 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) 636 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64))
600 return evas_common_copy_color_rgba_to_rgba_sse; 637 return evas_common_copy_color_rgba_to_rgba_sse;
601#endif 638#endif
602#ifdef BUILD_MMX 639#ifdef BUILD_MMX
@@ -755,25 +792,66 @@ evas_common_draw_func_copy_get(int pixels, int reverse)
755 } 792 }
756 else 793 else
757 { 794 {
758#ifdef BUILD_SSE 795#if 1
759 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) 796
760 return evas_common_copy_pixels_rgba_to_rgba_sse; 797# ifdef BUILD_MMX
798# ifdef BUILD_C
799 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2))
800# endif
801 return evas_common_copy_pixels_rgba_to_rgba_mmx2;
802# ifdef BUILD_SSE
803 else
804# endif
805#endif
806#ifdef BUILD_SSE
807# ifdef BUILD_C
808 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64))
809# endif
810 return evas_common_copy_pixels_rgba_to_rgba_sse;
811# ifdef BUILD_MMX
812 else
813# endif
761#endif 814#endif
762#ifdef BUILD_MMX 815#ifdef BUILD_MMX
763# ifdef BUILD_SSE 816# ifdef BUILD_C
764 else 817 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
818# endif
819 return evas_common_copy_pixels_rgba_to_rgba_mmx;
820# ifdef BUILD_C
821 else
765# endif 822# endif
766 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) 823#endif
767 return evas_common_copy_pixels_rgba_to_rgba_mmx2;
768 else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
769 return evas_common_copy_pixels_rgba_to_rgba_mmx;
770#endif
771#ifdef BUILD_C 824#ifdef BUILD_C
825 return evas_common_copy_pixels_rgba_to_rgba_c;
826#endif
827
828#else
829
830# ifdef BUILD_SSE
831 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256))
832 return evas_common_copy_pixels_rgba_to_rgba_sse;
772# ifdef BUILD_MMX 833# ifdef BUILD_MMX
773 else 834 else
774# endif 835# endif
775 return evas_common_copy_pixels_rgba_to_rgba_c;
776#endif 836#endif
837#ifdef BUILD_MMX
838# ifdef BUILD_C
839 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2))
840# endif
841 return evas_common_copy_pixels_rgba_to_rgba_mmx2;
842# ifdef BUILD_C
843 else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
844# endif
845 return evas_common_copy_pixels_rgba_to_rgba_mmx;
846# ifdef BUILD_C
847 else
848# endif
849#endif
850#ifdef BUILD_C
851 return evas_common_copy_pixels_rgba_to_rgba_c;
852#endif
853
854#endif
777 } 855 }
778 if (!_evas_pow_lut) evas_common_blend_init_evas_pow_lut(); 856 if (!_evas_pow_lut) evas_common_blend_init_evas_pow_lut();
779#ifdef BUILD_C 857#ifdef BUILD_C