summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_line_main.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-11-13 11:27:50 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-13 12:20:57 +0900
commit05aee3e3706867605d3b1bb84c3a70ccafba0673 (patch)
treecf2ee2630803ac7cadacd2a51c987e65d9d69426 /src/lib/evas/common/evas_line_main.c
parent35beedd3d7e84723fb5ce7aca7102b594edece66 (diff)
Evas: Don't pass whole RGBA_Image to low-level render functions
Idea originated from Cedric the b0rker. This is a big fat search-and-replace commit. This commit also introduces space changes... Sorry for the mix. NOTE: This commit may have one side effect as there was some very dubious code chaning the dst image's alpha flag in the Gfx get functions. Logically this didn't make sense (at draw time the dst alpha should already be well defined), so it should be safe.
Diffstat (limited to 'src/lib/evas/common/evas_line_main.c')
-rw-r--r--src/lib/evas/common/evas_line_main.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/evas/common/evas_line_main.c b/src/lib/evas/common/evas_line_main.c
index 9d3aa6bae0..8301dccee9 100644
--- a/src/lib/evas/common/evas_line_main.c
+++ b/src/lib/evas/common/evas_line_main.c
@@ -49,7 +49,7 @@ _evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y)
49# endif 49# endif
50#endif 50#endif
51 { 51 {
52 pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); 52 pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst->cache_entry.flags.alpha, dc->render_op);
53 if (pfunc) 53 if (pfunc)
54 pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); 54 pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x);
55 } 55 }
@@ -70,7 +70,7 @@ evas_common_line_point_draw(RGBA_Image *dst, int clip_x, int clip_y, int clip_w,
70 if ((!no_cuse) && (!IN_RECT(x, y, clip_x, clip_y, clip_w, clip_h))) 70 if ((!no_cuse) && (!IN_RECT(x, y, clip_x, clip_y, clip_w, clip_h)))
71 return; 71 return;
72 72
73 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, render_op); 73 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst->cache_entry.flags.alpha, render_op);
74 if (pfunc) 74 if (pfunc)
75 pfunc(0, 255, color, dst->image.data + (dst->cache_entry.w * y) + x); 75 pfunc(0, 255, color, dst->image.data + (dst->cache_entry.w * y) + x);
76} 76}
@@ -147,7 +147,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
147# endif 147# endif
148#endif 148#endif
149 { 149 {
150 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); 150 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst->cache_entry.flags.alpha, len, dc->render_op);
151 if (sfunc) 151 if (sfunc)
152 sfunc(NULL, NULL, color, p, len); 152 sfunc(NULL, NULL, color, p, len);
153 } 153 }
@@ -155,7 +155,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
155 return; 155 return;
156 } 156 }
157 157
158 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); 158 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst->cache_entry.flags.alpha, dc->render_op);
159 if (!pfunc) return; 159 if (!pfunc) return;
160 160
161 if (dx == 0) 161 if (dx == 0)
@@ -488,13 +488,13 @@ _draw_render_thread_simple_line(RGBA_Image *dst, int clip_x, int clip_y, int cli
488 488
489 len = x1 - x0 + 1; 489 len = x1 - x0 + 1;
490 p = dst->image.data + (dstw * y0) + x0; 490 p = dst->image.data + (dstw * y0) + x0;
491 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, render_op); 491 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst->cache_entry.flags.alpha, len, render_op);
492 if (sfunc) sfunc(NULL, NULL, color, p, len); 492 if (sfunc) sfunc(NULL, NULL, color, p, len);
493 } 493 }
494 return; 494 return;
495 } 495 }
496 496
497 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, render_op); 497 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst->cache_entry.flags.alpha, render_op);
498 if (!pfunc) return; 498 if (!pfunc) return;
499 499
500 if (dx == 0) 500 if (dx == 0)
@@ -767,7 +767,7 @@ evas_common_line_draw_line(RGBA_Image *dst, int clip_x, int clip_y, int clip_w,
767 return; 767 return;
768 } 768 }
769 769
770 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, render_op); 770 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst->cache_entry.flags.alpha, render_op);
771 if (!pfunc) return; 771 if (!pfunc) return;
772 772
773 clx = clip_x; 773 clx = clip_x;
@@ -896,7 +896,7 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1,
896 } 896 }
897 897
898 color = dc->col.col; 898 color = dc->col.col;
899 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); 899 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst->cache_entry.flags.alpha, dc->render_op);
900 if (!pfunc) return; 900 if (!pfunc) return;
901 901
902 clx = dc->clip.x; 902 clx = dc->clip.x;
@@ -1053,7 +1053,7 @@ evas_common_line_draw_line_aa(RGBA_Image *dst, int clip_x, int clip_y, int clip_
1053 return; 1053 return;
1054 } 1054 }
1055 1055
1056 pfunc = evas_common_gfx_func_composite_mask_color_pt_get(color, dst, render_op); 1056 pfunc = evas_common_gfx_func_composite_mask_color_pt_get(color, dst->cache_entry.flags.alpha, render_op);
1057 if (!pfunc) return; 1057 if (!pfunc) return;
1058 1058
1059 clx = clip_x; 1059 clx = clip_x;
@@ -1202,7 +1202,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
1202 } 1202 }
1203 1203
1204 color = dc->col.col; 1204 color = dc->col.col;
1205 pfunc = evas_common_gfx_func_composite_mask_color_pt_get(color, dst, dc->render_op); 1205 pfunc = evas_common_gfx_func_composite_mask_color_pt_get(color, dst->cache_entry.flags.alpha, dc->render_op);
1206 if (!pfunc) return; 1206 if (!pfunc) return;
1207 1207
1208 clx = dc->clip.x; 1208 clx = dc->clip.x;