Huw Davies : winex11.drv: Merge some common code.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri May 25 14:43:44 CDT 2007
Module: wine
Branch: master
Commit: 4edc46cbdbd1f5eacd78a82ff32b27bb7181663e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4edc46cbdbd1f5eacd78a82ff32b27bb7181663e
Author: Huw Davies <huw at codeweavers.com>
Date: Thu May 24 16:32:06 2007 +0100
winex11.drv: Merge some common code.
---
dlls/winex11.drv/xrender.c | 28 ++++++++++------------------
1 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index e03540e..c8bd7ad 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -1301,24 +1301,17 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
wine_tsx11_lock();
XSetForeground( gdi_display, physDev->gc, textPixel );
- if(aa_type == AA_None) {
- for(idx = 0; idx < count; idx++) {
- SharpGlyphMono(physDev, physDev->dc_rect.left + x + xoff,
- physDev->dc_rect.top + y + yoff,
- formatEntry->bitmaps[wstr[idx]],
- &formatEntry->gis[wstr[idx]]);
- if(lpDx) {
- offset += lpDx[idx];
- xoff = offset * cosEsc;
- yoff = offset * -sinEsc;
- } else {
- xoff += formatEntry->gis[wstr[idx]].xOff;
- yoff += formatEntry->gis[wstr[idx]].yOff;
- }
- }
- } else if(physDev->depth == 1) {
+ if(aa_type == AA_None || physDev->depth == 1)
+ {
+ void (* sharp_glyph_fn)(X11DRV_PDEVICE *, INT, INT, void *, XGlyphInfo *);
+
+ if(aa_type == AA_None)
+ sharp_glyph_fn = SharpGlyphMono;
+ else
+ sharp_glyph_fn = SharpGlyphGray;
+
for(idx = 0; idx < count; idx++) {
- SharpGlyphGray(physDev, physDev->dc_rect.left + x + xoff,
+ sharp_glyph_fn(physDev, physDev->dc_rect.left + x + xoff,
physDev->dc_rect.top + y + yoff,
formatEntry->bitmaps[wstr[idx]],
&formatEntry->gis[wstr[idx]]);
@@ -1330,7 +1323,6 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
xoff += formatEntry->gis[wstr[idx]].xOff;
yoff += formatEntry->gis[wstr[idx]].yOff;
}
-
}
} else {
XImage *image;
More information about the wine-cvs
mailing list