walter harms <[email protected]> writes: > Am 06.05.2014 00:02, schrieb Keith Packard: >> This allocates span data for all of the provided arcs and draws the >> whole set in one call, rather than doing them one at a time. For >> modern hardware, this is a significant performance improvement. >> >> Signed-off-by: Keith Packard <[email protected]> >> --- >> mi/mifillarc.c | 98 >> ++++++++++++++++++++-------------------------------------- >> 1 file changed, 34 insertions(+), 64 deletions(-) >> >> diff --git a/mi/mifillarc.c b/mi/mifillarc.c >> index 337343d..1695121 100644 >> --- a/mi/mifillarc.c >> +++ b/mi/mifillarc.c
>> + >> + pts = points = malloc (sizeof (DDXPointRec) * nspans + sizeof(int) * >> nspans); >> + if (!points) >> + return; >> + wids = widths = (int *) (points + nspans); > > > this looks like a case for calloc(). calloc also does the work of zero initialization, which you don't want in your rendering paths where the data is getting fully initialized anyway.
pgpzqwkNdb3DO.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
