dri2: Initialize needInvalidate member of DRI2Drawable.

If the client is not behaving correctly and swaps buffers before
getting them, Valgrind will complain about uninitialized memory being
used in DRI2InvalidateDrawable.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Ville Syrjälä <syrjala@sci.fi>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Rami Ylimäki 2011-12-18 18:29:38 +02:00 committed by Keith Packard
parent 3aca819940
commit 603fcb3abf

View File

@ -181,6 +181,7 @@ DRI2AllocateDrawable(DrawablePtr pDraw)
pPriv->last_swap_ust = 0; pPriv->last_swap_ust = 0;
list_init(&pPriv->reference_list); list_init(&pPriv->reference_list);
pPriv->serialNumber = DRI2DrawableSerial(pDraw); pPriv->serialNumber = DRI2DrawableSerial(pDraw);
pPriv->needInvalidate = FALSE;
if (pDraw->type == DRAWABLE_WINDOW) { if (pDraw->type == DRAWABLE_WINDOW) {
pWin = (WindowPtr) pDraw; pWin = (WindowPtr) pDraw;