[PATCH 01/13] dix: Re-type and reorder GCRec

Matt Turner mattst88 at gmail.com
Tue Nov 23 16:43:12 PST 2010


On Tue, Nov 23, 2010 at 9:26 PM, Keith Packard <keithp at keithp.com> wrote:
> On Tue, 23 Nov 2010 14:45:36 -0500, Adam Jackson <ajax at redhat.com> wrote:
>> No change on ILP32, but shrinks from 160 to 128 bytes on LP64.
>>
>> Signed-off-by: Adam Jackson <ajax at redhat.com>
>> ---
>>  include/gcstruct.h |   12 ++++++------
>>  1 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/include/gcstruct.h b/include/gcstruct.h
>> index 4fea02c..767adac 100644
>> --- a/include/gcstruct.h
>> +++ b/include/gcstruct.h
>> @@ -291,9 +291,9 @@ typedef struct _GC {
>>      unsigned int     freeCompClip:1;  /* Free composite clip */
>>      unsigned int     scratch_inuse:1; /* is this GC in a pool for reuse? */
>>      unsigned int     unused:13; /* see comment above */
>> -    unsigned long    planemask;
>> -    unsigned long    fgPixel;
>> -    unsigned long    bgPixel;
>> +    unsigned int     planemask;
>> +    unsigned int     fgPixel;
>> +    unsigned int     bgPixel;
>
> unit32_t seems like a better choice.

What about all the unsigned char/shorts? Another patch to change them
to uint{8,16}_t? Mixing uint32_t into a struct filled with unsigned
char/short/int/long seems dirty.


More information about the xorg-devel mailing list