From 889d7dd8e94a5538f388cc619115bf5c0b6fc0b7 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 10 Sep 2013 09:01:25 +0200 Subject: fontconfig libX11 libXmu libxcb mesa xserver git update 10 Sep 2013 xserver commit 47ff382d1fce25a8b097d45b79489e891f1f1228 libxcb commit f1405d9fe4a6ddcae24585ba254389a4c4f4c8c9 libX11 commit cb107760df33ffc8630677e66e2e50aa37950a5c libXmu commit 2539e539eafdac88177c8ee30b043c5d52f017e4 fontconfig commit a61e145304da86c8c35b137493bbd8fd5dd1e7f5 mesa commit 395b9410860371a64d6b5f2d50679f29eb41729e --- xorg-server/hw/xwin/winsetsp.c | 52 +++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 23 deletions(-) (limited to 'xorg-server/hw/xwin/winsetsp.c') diff --git a/xorg-server/hw/xwin/winsetsp.c b/xorg-server/hw/xwin/winsetsp.c index f102f9ff5..11108cb53 100644 --- a/xorg-server/hw/xwin/winsetsp.c +++ b/xorg-server/hw/xwin/winsetsp.c @@ -46,7 +46,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, PixmapPtr pPixmap = NULL; winPrivPixmapPtr pPixmapPriv = NULL; HBITMAP hbmpOrig = NULL; - BITMAPINFO bmi; + BITMAPINFO *pbmi; HRGN hrgn = NULL, combined = NULL; int nbox; BoxPtr pbox; @@ -57,6 +57,8 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, if (!nbox) return; + pbmi = malloc(sizeof(BITMAPINFO) + sizeof(RGBQUAD)); + combined = CreateRectRgn(pbox->x1, pbox->y1, pbox->x2, pbox->y2); nbox--; pbox++; @@ -86,19 +88,20 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, "failed on pPixmapPriv->hBitmap\n"); while (iSpans--) { - ZeroMemory(&bmi, sizeof(BITMAPINFO)); - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biWidth = *piWidths; - bmi.bmiHeader.biHeight = 1; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biBitCount = pDrawable->depth; - bmi.bmiHeader.biCompression = BI_RGB; + ZeroMemory(pbmi, sizeof(BITMAPINFO)); + pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + pbmi->bmiHeader.biWidth = *piWidths; + pbmi->bmiHeader.biHeight = 1; + pbmi->bmiHeader.biPlanes = 1; + pbmi->bmiHeader.biBitCount = pDrawable->depth; + pbmi->bmiHeader.biCompression = BI_RGB; /* Setup color table for mono DIBs */ if (pDrawable->depth == 1) { - bmi.bmiColors[1].rgbBlue = 255; - bmi.bmiColors[1].rgbGreen = 255; - bmi.bmiColors[1].rgbRed = 255; + RGBQUAD *bmiColors = &(pbmi->bmiColors[0]); + bmiColors[1].rgbBlue = 255; + bmiColors[1].rgbGreen = 255; + bmiColors[1].rgbRed = 255; } StretchDIBits(pGCPriv->hdcMem, @@ -107,7 +110,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, 0, 0, *piWidths, 1, pSrcs, - (BITMAPINFO *) &bmi, + (BITMAPINFO *) pbmi, DIB_RGB_COLORS, g_copyROP[pGC->alu]); pSrcs += PixmapBytePad(*piWidths, pDrawable->depth); @@ -129,19 +132,20 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, combined = NULL; while (iSpans--) { - ZeroMemory(&bmi, sizeof(BITMAPINFO)); - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biWidth = *piWidths; - bmi.bmiHeader.biHeight = 1; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biBitCount = pDrawable->depth; - bmi.bmiHeader.biCompression = BI_RGB; + ZeroMemory(pbmi, sizeof(BITMAPINFO)); + pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + pbmi->bmiHeader.biWidth = *piWidths; + pbmi->bmiHeader.biHeight = 1; + pbmi->bmiHeader.biPlanes = 1; + pbmi->bmiHeader.biBitCount = pDrawable->depth; + pbmi->bmiHeader.biCompression = BI_RGB; /* Setup color table for mono DIBs */ if (pDrawable->depth == 1) { - bmi.bmiColors[1].rgbBlue = 255; - bmi.bmiColors[1].rgbGreen = 255; - bmi.bmiColors[1].rgbRed = 255; + RGBQUAD *bmiColors = &(pbmi->bmiColors[0]); + bmiColors[1].rgbBlue = 255; + bmiColors[1].rgbGreen = 255; + bmiColors[1].rgbRed = 255; } StretchDIBits(pGCPriv->hdc, @@ -150,7 +154,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, 0, 0, *piWidths, 1, pSrcs, - (BITMAPINFO *) &bmi, + (BITMAPINFO *) pbmi, DIB_RGB_COLORS, g_copyROP[pGC->alu]); pSrcs += PixmapBytePad(*piWidths, pDrawable->depth); @@ -166,4 +170,6 @@ winSetSpansNativeGDI(DrawablePtr pDrawable, FatalError("\nwinSetSpansNativeGDI - Unknown drawable type\n\n"); break; } + + free(pbmi); } -- cgit v1.2.3