hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0541d1ebe690a1ac999a523141a078de02ae2b8f
commit 0541d1ebe690a1ac999a523141a078de02ae2b8f Author: ChunEon Park <her...@hermet.pe.kr> Date: Fri Feb 7 22:37:53 2014 +0900 evas/common - code clean up one if-else if compare is enough. don't try compare twice. --- src/lib/evas/common/evas_blend_main.c | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/src/lib/evas/common/evas_blend_main.c b/src/lib/evas/common/evas_blend_main.c index 558d597..6d3e0d8 100644 --- a/src/lib/evas/common/evas_blend_main.c +++ b/src/lib/evas/common/evas_blend_main.c @@ -165,12 +165,9 @@ evas_common_gfx_func_composite_color_span_get(DATA32 col, RGBA_Image *dst, int p if ((col & 0xff000000) == 0xff000000) { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; + if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; + else if (op == EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } - comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_color_span_get(col, dst, pixels); @@ -187,12 +184,9 @@ evas_common_gfx_func_composite_pixel_color_span_get(RGBA_Image *src, DATA32 col, if ((src && (!src->cache_entry.flags.alpha)) && ((col & 0xff000000) == 0xff000000)) { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == _EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; + if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; + else if (op == _EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } - comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_pixel_color_span_get(src, col, dst, pixels); @@ -237,10 +231,8 @@ evas_common_gfx_func_composite_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Im if (!src_flags.alpha) { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == _EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; + if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; + else if (op == _EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } comp = evas_gfx_compositor_get(op); if (comp) @@ -258,12 +250,9 @@ evas_common_gfx_func_composite_color_pt_get(DATA32 col, RGBA_Image *dst, int op) if ((col & 0xff000000) == 0xff000000) { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; + if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; + else if (op == EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } - comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_color_pt_get(col, dst); @@ -280,12 +269,9 @@ evas_common_gfx_func_composite_pixel_color_pt_get(Image_Entry_Flags src_flags, D if ((!src_flags.alpha) && ((col & 0xff000000) == 0xff000000)) { - if (op == _EVAS_RENDER_BLEND) - op = _EVAS_RENDER_COPY; - if (op == _EVAS_RENDER_BLEND_REL) - op = _EVAS_RENDER_COPY_REL; + if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; + else if (op == _EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } - comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_pixel_color_pt_get(src_flags, col, dst); --