treewide: drop unnecessary pixmap field initialization
The PixmapRec is already calloc()'ed, so no need for additional zero-writes into individual fields. This also removes some unncessary #ifdefs. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
37b7ea8f8a
commit
24e190a935
|
@ -53,14 +53,10 @@ fbCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
|
|||
if (!pPixmap)
|
||||
return NullPixmap;
|
||||
pPixmap->drawable.type = DRAWABLE_PIXMAP;
|
||||
pPixmap->drawable.class = 0;
|
||||
pPixmap->drawable.pScreen = pScreen;
|
||||
pPixmap->drawable.depth = depth;
|
||||
pPixmap->drawable.bitsPerPixel = bpp;
|
||||
pPixmap->drawable.id = 0;
|
||||
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
pPixmap->drawable.x = 0;
|
||||
pPixmap->drawable.y = 0;
|
||||
pPixmap->drawable.width = width;
|
||||
pPixmap->drawable.height = height;
|
||||
pPixmap->devKind = paddedWidth;
|
||||
|
@ -74,11 +70,6 @@ fbCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
|
|||
fbInitializeDrawable(&pPixmap->drawable);
|
||||
#endif
|
||||
|
||||
#if defined(COMPOSITE) || defined(ROOTLESS)
|
||||
pPixmap->screen_x = 0;
|
||||
pPixmap->screen_y = 0;
|
||||
#endif
|
||||
|
||||
pPixmap->usage_hint = usage_hint;
|
||||
|
||||
return pPixmap;
|
||||
|
|
|
@ -43,12 +43,8 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
|
|||
if (!pPixmap)
|
||||
return NullPixmap;
|
||||
pPixmap->drawable.type = DRAWABLE_PIXMAP;
|
||||
pPixmap->drawable.class = 0;
|
||||
pPixmap->drawable.depth = depth;
|
||||
pPixmap->drawable.bitsPerPixel = depth;
|
||||
pPixmap->drawable.id = 0;
|
||||
pPixmap->drawable.x = 0;
|
||||
pPixmap->drawable.y = 0;
|
||||
pPixmap->drawable.width = width;
|
||||
pPixmap->drawable.height = height;
|
||||
pPixmap->drawable.pScreen = pScreen;
|
||||
|
|
|
@ -1057,24 +1057,16 @@ winCreatePixmapMultiwindow(ScreenPtr pScreen, int width, int height, int depth,
|
|||
|
||||
/* setup Pixmap header */
|
||||
pPixmap->drawable.type = DRAWABLE_PIXMAP;
|
||||
pPixmap->drawable.class = 0;
|
||||
pPixmap->drawable.pScreen = pScreen;
|
||||
pPixmap->drawable.depth = depth;
|
||||
pPixmap->drawable.bitsPerPixel = bpp;
|
||||
pPixmap->drawable.id = 0;
|
||||
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
pPixmap->drawable.x = 0;
|
||||
pPixmap->drawable.y = 0;
|
||||
pPixmap->drawable.width = width;
|
||||
pPixmap->drawable.height = height;
|
||||
pPixmap->devKind = paddedwidth;
|
||||
pPixmap->refcnt = 1;
|
||||
pPixmap->devPrivate.ptr = NULL; // later set to pbBits
|
||||
pPixmap->primary_pixmap = NULL;
|
||||
#ifdef COMPOSITE
|
||||
pPixmap->screen_x = 0;
|
||||
pPixmap->screen_y = 0;
|
||||
#endif
|
||||
pPixmap->usage_hint = usage_hint;
|
||||
|
||||
/* Check for zero width or height pixmaps */
|
||||
|
|
Loading…
Reference in New Issue