summaryrefslogtreecommitdiff
path: root/hw/xgl
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-12-31 08:01:31 +0000
committerEric Anholt <anholt@freebsd.org>2005-12-31 08:01:31 +0000
commitc25536a7937b11a5347bfb8796d5cb6eb0445b51 (patch)
tree1ed3b80e9e63b01f348d67d73d43b0f4fc1c1151 /hw/xgl
parente6dab3d7c429a2d30d31f188c4554e870011e051 (diff)
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.
Diffstat (limited to 'hw/xgl')
-rw-r--r--hw/xgl/xglsync.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/xgl/xglsync.c b/hw/xgl/xglsync.c
index 0fa3aa05a..d15733c6b 100644
--- a/hw/xgl/xglsync.c
+++ b/hw/xgl/xglsync.c
@@ -173,6 +173,7 @@ xglSyncBits (DrawablePtr pDrawable,
pBox = REGION_RECTS (&region);
nBox = REGION_NUM_RECTS (&region);
+ 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;