Re: [PATCH] gl/msaa: Add a fast path for fills that are simple quads

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Wed, Jan 23, 2013 at 02:06:35PM -0800, Martin Robinson wrote:
> +    /* If either division would produce a number between 0 and 1, i.e.
> +     * the numerator is smaller than the denominator and their signs are
> +     * the same, then the lines intersect. */
> +    if (_cairo_int64_lt (numerator_a, denominator) &&
> +	_cairo_int64_gt (_cairo_int64_mul (numerator_a, denominator), 0)) {

Hmm, whilst not strictly the same, I think it is correct though to use
  && _cairo_int64_negative(_cairo_int64_mul(numerate_a, denominator))

Better yet as this avoids the multiply and should allow us to avoid
those costly 64-bits on some platforms:
  && (_cairo_int64_negative(numerator_a) ^ _cairo_int64_negative(denominator))
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.