summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2017-02-28 11:41:12 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-02-28 13:07:13 +0900
commitb0ecb1fc907735d2fd8e8108a655b4ee79038712 (patch)
treea6398aaf05b686980a55944acbb1669c063b2c96
parent82188e12b5b113c7fed559ec48828683d90d53c7 (diff)
evas: Drop duplicate macro definitions SETUP_LINE_*
Summary: SETUP_LINE_SHALLOW and SETUP_LINE_STEEP are each identically defined (except whitespace) in evas_line_main.c Reviewers: cedric, jpeg Subscribers: jpeg, cedric Differential Revision: https://phab.enlightenment.org/D4681
-rw-r--r--src/lib/evas/common/evas_line_main.c146
1 files changed, 0 insertions, 146 deletions
diff --git a/src/lib/evas/common/evas_line_main.c b/src/lib/evas/common/evas_line_main.c
index 109e256ac7..21dd74277d 100644
--- a/src/lib/evas/common/evas_line_main.c
+++ b/src/lib/evas/common/evas_line_main.c
@@ -747,152 +747,6 @@ _draw_render_thread_simple_line(RGBA_Image *dst, int clip_x, int clip_y, int cli
747 } 747 }
748} 748}
749 749
750#define SETUP_LINE_SHALLOW \
751 if (x0 > x1) \
752 { \
753 EXCHANGE_POINTS(x0, y0, x1, y1); \
754 dx = -dx; \
755 dy = -dy; \
756 } \
757 \
758 px = x0; \
759 py = y0; \
760 \
761 p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \
762 p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \
763 \
764 dely = 1; \
765 dh = dstw; \
766 if (dy < 0) \
767 { \
768 dely = -1; \
769 dh = -dstw; \
770 } \
771 \
772 dyy = ((dy) << 16) / (dx); \
773 \
774 if (!p0_in) \
775 { \
776 dxx = ((dx) << 16) / (dy); \
777 if (px < 0) \
778 { \
779 x = -px; px = 0; \
780 yy = x * dyy; \
781 y = yy >> 16; \
782 if (!a_a) \
783 y += (yy - (y << 16)) >> 15; \
784 py += y; \
785 if ((dely > 0) && (py >= clh)) \
786 return; \
787 else if ((dely < 0) && (py < -1)) \
788 return; \
789 } \
790 \
791 y = 0; \
792 if ((dely > 0) && (py < 0)) \
793 y = (-1 - py); \
794 else if ((dely < 0) && (py >= clh)) \
795 y = (clh - 1 - py); \
796 \
797 xx = y * dxx; \
798 x = xx >> 16; \
799 if (!a_a) \
800 x += (xx - (x << 16)) >> 15; \
801 px += x; \
802 if (px >= clw) return; \
803 \
804 yy = x * dyy; \
805 y = yy >> 16; \
806 if (!a_a) \
807 y += (yy - (y << 16)) >> 15; \
808 py += y; \
809 if ((dely > 0) && (py >= clh)) \
810 return; \
811 else if ((dely < 0) && (py < -1)) \
812 return; \
813 } \
814 \
815 p = data + (dstw * py) + px; \
816 \
817 x = px - x0; \
818 yy = x * dyy; \
819 prev_y = (yy >> 16); \
820 \
821 rx = MIN(x1 + 1, clw); \
822 by = clh - 1;
823
824
825#define SETUP_LINE_STEEP \
826 if (y0 > y1) \
827 { \
828 EXCHANGE_POINTS(x0, y0, x1, y1); \
829 dx = -dx; \
830 dy = -dy; \
831 } \
832 \
833 px = x0; \
834 py = y0; \
835 \
836 p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \
837 p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \
838 \
839 delx = 1; \
840 if (dx < 0) \
841 delx = -1; \
842 \
843 dxx = ((dx) << 16) / (dy); \
844 \
845 if (!p0_in) \
846 { \
847 dyy = ((dy) << 16) / (dx); \
848 \
849 if (py < 0) \
850 { \
851 y = -py; py = 0; \
852 xx = y * dxx; \
853 x = xx >> 16; \
854 if (!a_a) \
855 x += (xx - (x << 16)) >> 15; \
856 px += x; \
857 if ((delx > 0) && (px >= clw)) \
858 return; \
859 else if ((delx < 0) && (px < -1)) \
860 return; \
861 } \
862 \
863 x = 0; \
864 if ((delx > 0) && (px < -1)) \
865 x = (-1 - px); \
866 else if ((delx < 0) && (px >= clw)) \
867 x = (clw - 1 - px); \
868 \
869 yy = x * dyy; \
870 y = yy >> 16; \
871 if (!a_a) \
872 y += (yy - (y << 16)) >> 15; \
873 py += y; \
874 if (py >= clh) return; \
875 \
876 xx = y * dxx; \
877 x = xx >> 16; \
878 if (!a_a) \
879 x += (xx - (x << 16)) >> 15; \
880 px += x; \
881 if ((delx > 0) && (px >= clw)) \
882 return; \
883 else if ((delx < 0) && (px < -1)) \
884 return; \
885 } \
886 \
887 p = data + (dstw * py) + px; \
888 \
889 y = py - y0; \
890 xx = y * dxx; \
891 prev_x = (xx >> 16); \
892 \
893 by = MIN(y1 + 1, clh); \
894 rx = clw - 1;
895
896EAPI void 750EAPI void
897evas_common_line_draw_line(RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x0, int y0, int x1, int y1, RGBA_Image *mask_ie, int mask_x, int mask_y) 751evas_common_line_draw_line(RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x0, int y0, int x1, int y1, RGBA_Image *mask_ie, int mask_x, int mask_y)
898{ 752{