[PATCH 12/13] mi: Fill all spans for PolyFillArc at once

Keith Packard keithp at keithp.com
Wed May 7 11:56:55 PDT 2014

walter harms <wharms at bfs.de> writes:

> nitpicking, i would do it the other way around (i++),
> i have learned that ppl are bad at reading that work that way.
> (note: perhaps nspans could be unsigned to avoid fancy problems
> with extreme large values.)

I'm following the local coding style which does the loop this way for
some reason.

Either would be fine; keeping the stuff in the file consistent seems
valuable, but fixing both to operate in a sane direction would also be
fine. Perhaps that should be done in a patch before applying this change?

> this looks like a case for calloc().

As Eric says, calloc clears the memory. As we may well draw
significantly fewer spans than we allocate (due to dashing), not
trashing even more of the cache seems useful.

I'll answer the obvious overflow question in my response to Eric's
direct question about that.

> IMHO FillSpans should should check nspans (note:no such checks otherwise).

That would be nice, but that's an ABI change, which we should avoid

> just my 2 cents,
>  wh

Thanks for your review!

keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140507/1f4745b6/attachment.sig>

More information about the xorg-devel mailing list