[Pixman] [PATCH] bits: optimise fetching width==1 repeats

Soeren Sandmann sandmann at cs.au.dk
Mon Aug 22 08:23:24 PDT 2011


Chris Wilson <chris at chris-wilson.co.uk> writes:

> -    while (width)
> +    if (image->width == 1)
> +    {
> +	if (wide)
> +	    replicate_pixel_64 (image, 0, y, width, buffer);
> +	else
> +	    replicate_pixel_32 (image, 0, y, width, buffer);
> +    }
> +    else while (width)
>      {

Just one final nitpick: I don't like this "else while"; how about just
returning in the "if (image->width == 1)"?


Soren


More information about the Pixman mailing list