[Pixman] [PATCH 1/2] sse2: if width == stride, convert to linear image

Chris Wilson chris at chris-wilson.co.uk
Fri May 6 05:44:54 PDT 2011


On Fri, 06 May 2011 09:18:51 +0200, Soeren Sandmann <sandmann at cs.au.dk> wrote:
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> 
> > +    if (width == stride) {
> > +	width *= height;
> > +	height = 1;
> > +    }
> 
> Do we need a check here that the mulitplication doesn't overflow?
> pixman_multiply_overflows_int() can be used for that.

I think we are safe here, as we check for height*stride (in bytes)
overflow during create_bits().

I'll work these small patches into a real submission with a corresponding
addition to the test suite. Thanks,
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Pixman mailing list