From d901ff50d323e1ea6b0c564a2c46822b116feb6b Mon Sep 17 00:00:00 2001
From: Roderick Colenbrander <thunderbird2k@gmail.com>
Date: Sun, 2 Aug 2009 18:46:18 +0200
Subject: [PATCH] Make sure a R8G8B8 pixel format is used for converting the physdev text color to an XRender color. At the moment the physdev color is in this format but in the future the physdev itself might use a different format while the text color is always in r8g8b8.

---
 dlls/winex11.drv/xrender.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index a5ea946..ecde8ab 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -1346,7 +1346,8 @@ static Picture get_tile_pict(WineXRenderFormat *wxr_format, int text_pixel)
 
     if(text_pixel != tile->current_color && wxr_format->format != WXR_FORMAT_MONO)
     {
-        get_xrender_color(wxr_format, text_pixel, &col);
+        /* text_pixel is in R8G8B8 */
+        get_xrender_color(get_xrender_format(WXR_FORMAT_R8G8B8), text_pixel, &col);
         wine_tsx11_lock();
         pXRenderFillRectangle(gdi_display, PictOpSrc, tile->pict, &col, 0, 0, 1, 1);
         wine_tsx11_unlock();
@@ -2019,7 +2020,8 @@ BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE
     if(physDevSrc->depth == 1)
     {
         XRenderColor col;
-        get_xrender_color(dst_format, physDevDst->textPixel, &col);
+        /* textPixel is in R8G8B8 */
+        get_xrender_color(get_xrender_format(WXR_FORMAT_R8G8B8), physDevDst->textPixel, &col);
 
         /* We use the source drawable as a mask */
         wine_tsx11_lock();
-- 
1.6.0.4

