Initialize the fourcc value in stack-allocated glitz_pixel_format_t
structures. Greatly reduces the number of uninitialized-value accesses
during Xgl startup according to valgrind. Allocating and filling these
in by hand on the stack seems very shady to me.
This commit is contained in:
@@ -173,6 +173,7 @@ xglSyncBits (DrawablePtr pDrawable,
|
||||
pBox = REGION_RECTS (®ion);
|
||||
nBox = REGION_NUM_RECTS (®ion);
|
||||
|
||||
format.fourcc = GLITZ_FOURCC_RGB;
|
||||
format.masks = pPixmapPriv->pPixel->masks;
|
||||
|
||||
while (nBox--)
|
||||
@@ -250,6 +251,7 @@ xglSyncSurface (DrawablePtr pDrawable)
|
||||
pBox = REGION_RECTS (pRegion);
|
||||
pExt = REGION_EXTENTS (pDrawable->pScreen, pRegion);
|
||||
|
||||
format.fourcc = GLITZ_FOURCC_RGB;
|
||||
format.masks = pPixmapPriv->pPixel->masks;
|
||||
format.xoffset = pExt->x1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user