From: Søren Sandmann Pedersen Date: Fri, 21 Sep 2012 20:52:16 +0000 (-0400) Subject: pixman-combine.c.template: Formatting clean-ups X-Git-Tag: pixman-0.27.4~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f580c4c5b2a435ebe2751ce0dace6c42568557f8;p=platform%2Fupstream%2Fpixman.git pixman-combine.c.template: Formatting clean-ups Various formatting fixes, and removal of some obsolete comments about strength reduction of operators. --- diff --git a/pixman/pixman-combine.c.template b/pixman/pixman-combine.c.template index 50d2b0a..f405312 100644 --- a/pixman/pixman-combine.c.template +++ b/pixman/pixman-combine.c.template @@ -6,10 +6,9 @@ #include #include "pixman-private.h" - #include "pixman-combine.h" -/*** per channel helper functions ***/ +/* component alpha helper functions */ static void combine_mask_ca (comp4_t *src, comp4_t *mask) @@ -91,15 +90,11 @@ combine_mask_alpha_ca (const comp4_t *src, comp4_t *mask) /* * There are two ways of handling alpha -- either as a single unified value or * a separate value for each component, hence each macro must have two - * versions. The unified alpha version has a 'U' at the end of the name, - * the component version has a 'C'. Similarly, functions which deal with + * versions. The unified alpha version has a 'u' at the end of the name, + * the component version has a 'ca'. Similarly, functions which deal with * this difference will have two versions using the same convention. */ -/* - * All of the composing functions - */ - static force_inline comp4_t combine_mask (const comp4_t *src, const comp4_t *mask, int i) { @@ -154,7 +149,9 @@ combine_src_u (pixman_implementation_t *imp, int i; if (!mask) + { memcpy (dest, src, width * sizeof (comp4_t)); + } else { for (i = 0; i < width; ++i) @@ -166,7 +163,6 @@ combine_src_u (pixman_implementation_t *imp, } } -/* if the Src is opaque, call combine_src_u */ static void combine_over_u (pixman_implementation_t *imp, pixman_op_t op, @@ -188,7 +184,6 @@ combine_over_u (pixman_implementation_t *imp, } } -/* if the Dst is opaque, this is a noop */ static void combine_over_reverse_u (pixman_implementation_t *imp, pixman_op_t op, @@ -209,7 +204,6 @@ combine_over_reverse_u (pixman_implementation_t *imp, } } -/* if the Dst is opaque, call combine_src_u */ static void combine_in_u (pixman_implementation_t *imp, pixman_op_t op, @@ -229,7 +223,6 @@ combine_in_u (pixman_implementation_t *imp, } } -/* if the Src is opaque, this is a noop */ static void combine_in_reverse_u (pixman_implementation_t *imp, pixman_op_t op, @@ -250,7 +243,6 @@ combine_in_reverse_u (pixman_implementation_t *imp, } } -/* if the Dst is opaque, call combine_clear */ static void combine_out_u (pixman_implementation_t *imp, pixman_op_t op, @@ -270,7 +262,6 @@ combine_out_u (pixman_implementation_t *imp, } } -/* if the Src is opaque, call combine_clear */ static void combine_out_reverse_u (pixman_implementation_t *imp, pixman_op_t op, @@ -291,9 +282,6 @@ combine_out_reverse_u (pixman_implementation_t *imp, } } -/* if the Src is opaque, call combine_in_u */ -/* if the Dst is opaque, call combine_over_u */ -/* if both the Src and Dst are opaque, call combine_src_u */ static void combine_atop_u (pixman_implementation_t *imp, pixman_op_t op, @@ -316,9 +304,6 @@ combine_atop_u (pixman_implementation_t *imp, } } -/* if the Src is opaque, call combine_over_reverse_u */ -/* if the Dst is opaque, call combine_in_reverse_u */ -/* if both the Src and Dst are opaque, call combine_dst_u */ static void combine_atop_reverse_u (pixman_implementation_t *imp, pixman_op_t op, @@ -341,9 +326,6 @@ combine_atop_reverse_u (pixman_implementation_t *imp, } } -/* if the Src is opaque, call combine_over_u */ -/* if the Dst is opaque, call combine_over_reverse_u */ -/* if both the Src and Dst are opaque, call combine_clear */ static void combine_xor_u (pixman_implementation_t *imp, pixman_op_t op, @@ -385,9 +367,6 @@ combine_add_u (pixman_implementation_t *imp, } } -/* if the Src is opaque, call combine_add_u */ -/* if the Dst is opaque, call combine_add_u */ -/* if both the Src and Dst are opaque, call combine_add_u */ static void combine_saturate_u (pixman_implementation_t *imp, pixman_op_t op, @@ -444,7 +423,6 @@ combine_saturate_u (pixman_implementation_t *imp, * Multiply * B(Dca, ad, Sca, as) = Dca.Sca */ - static void combine_multiply_u (pixman_implementation_t *imp, pixman_op_t op, @@ -1579,9 +1557,8 @@ combine_conjoint_xor_u (pixman_implementation_t *imp, combine_conjoint_general_u (dest, src, mask, width, COMBINE_XOR); } -/************************************************************************/ -/*********************** Per Channel functions **************************/ -/************************************************************************/ + +/* Component alpha combiners */ static void combine_clear_ca (pixman_implementation_t *imp, @@ -2458,4 +2435,3 @@ _pixman_setup_combiner_functions_width (pixman_implementation_t *imp) imp->combine_width_ca[PIXMAN_OP_HSL_COLOR] = combine_dst; imp->combine_width_ca[PIXMAN_OP_HSL_LUMINOSITY] = combine_dst; } -