[cairo] [PATCH] mesh-rasterize: Fix number of iterations
Bryce W. Harrington
b.harrington at samsung.com
Tue Mar 18 18:10:24 PDT 2014
On Fri, Mar 14, 2014 at 03:35:50PM +0100, Uli Schlachter wrote:
> Commit 44a09f462c fixed a compiler warning, but changed the result of this code.
> This is because the old 'for' loop did one more iteration than the new 'while'
> loop. Fix this by incrementing the loop counter once before the loop.
>
> Fixes mesh-pattern mesh-pattern-accuracy mesh-pattern-conical
> mesh-pattern-control-points mesh-pattern-fold mesh-pattern-overlap
> mesh-pattern-transformed record-mesh
>
> Signed-off-by: Uli Schlachter <psychon at znc.in>
Tested-by: Bryce Harrington <b.harrington at samsung.com>
> ---
> src/cairo-mesh-pattern-rasterizer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/cairo-mesh-pattern-rasterizer.c b/src/cairo-mesh-pattern-rasterizer.c
> index 548e880..1b63ca8 100644
> --- a/src/cairo-mesh-pattern-rasterizer.c
> +++ b/src/cairo-mesh-pattern-rasterizer.c
> @@ -728,6 +728,7 @@ rasterize_bezier_patch (unsigned char *data, int width, int height, int stride,
> dcend[i] = (col[3][i] - col[1][i]) / v;
> }
>
> + v++;
> while (v--) {
> cairo_point_double_t nodes[4];
> for (i = 0; i < 4; ++i) {
> --
> 1.9.0
>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
More information about the cairo
mailing list