mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-11 23:43:06 +00:00
render: repack PictureRec
Eliminate the unused dither field, move filter and stateChanges into the bitfield, and reorder elements to pack holes on LP64. sizeof(PictureRec) ILP32 LP64 before: 84 152 after: 72 120 Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
7ee965a300
commit
48bc8d0dd9
3 changed files with 9 additions and 14 deletions
|
|
@ -151,8 +151,6 @@ typedef struct _Picture {
|
|||
PictFormatShort format; /* PICT_FORMAT */
|
||||
int refcnt;
|
||||
CARD32 id;
|
||||
PicturePtr pNext; /* chain on same drawable */
|
||||
|
||||
unsigned int repeat : 1;
|
||||
unsigned int graphicsExposures : 1;
|
||||
unsigned int subWindowMode : 1;
|
||||
|
|
@ -162,7 +160,11 @@ typedef struct _Picture {
|
|||
unsigned int clientClipType : 2;
|
||||
unsigned int componentAlpha : 1;
|
||||
unsigned int repeatType : 2;
|
||||
unsigned int unused : 21;
|
||||
unsigned int filter : 3;
|
||||
unsigned int stateChanges : CPLastBit;
|
||||
unsigned int unused : 18 - CPLastBit;
|
||||
|
||||
PicturePtr pNext; /* chain on same drawable */
|
||||
|
||||
PicturePtr alphaMap;
|
||||
DDXPointRec alphaOrigin;
|
||||
|
|
@ -170,9 +172,6 @@ typedef struct _Picture {
|
|||
DDXPointRec clipOrigin;
|
||||
pointer clientClip;
|
||||
|
||||
Atom dither;
|
||||
|
||||
unsigned long stateChanges;
|
||||
unsigned long serialNumber;
|
||||
|
||||
RegionPtr pCompositeClip;
|
||||
|
|
@ -181,10 +180,9 @@ typedef struct _Picture {
|
|||
|
||||
PictTransform *transform;
|
||||
|
||||
int filter;
|
||||
SourcePictPtr pSourcePict;
|
||||
xFixed *filter_params;
|
||||
int filter_nparams;
|
||||
SourcePictPtr pSourcePict;
|
||||
} PictureRec;
|
||||
|
||||
typedef Bool (*PictFilterValidateParamsProcPtr) (ScreenPtr pScreen, int id,
|
||||
|
|
@ -205,6 +203,7 @@ typedef struct {
|
|||
#define PictFilterBest 4
|
||||
|
||||
#define PictFilterConvolution 5
|
||||
/* if you add an 8th filter, expand the filter bitfield above */
|
||||
|
||||
typedef struct {
|
||||
char *alias;
|
||||
|
|
|
|||
Loading…
Reference in a new issue