[PATCH 14/18] xfixes: switch to byte counting functions
Bill Crawford
billcrawford1970 at gmail.com
Fri Jul 10 03:33:59 PDT 2009
Peter Hutterer wrote:
> - nbytesRound = (nbytes + 3) & ~3;
> + nbytesRound = pad_to_dwords(nbytes);
You're replacing two arithmetic operations with a function call here,
and then ...
> - rep->length = npixels + (nbytesRound >> 2);
> + rep->length = npixels + num_dwords_for_bytes(nbytesRound);
Is it really worth replacing a two-bit shift with a function call?
More information about the xorg-devel
mailing list