Client side render fonts for XServers without the Render extension

using X11 core requests.
This commit is contained in:
Huw Davies 2002-11-14 22:31:34 +00:00 committed by Alexandre Julliard
parent 3f61afbbc8
commit 94705862d6
7 changed files with 768 additions and 226 deletions

View File

@ -60,6 +60,10 @@ Window root_window;
int dxgrab, usedga, usexvidmode; int dxgrab, usedga, usexvidmode;
int use_take_focus = 1; int use_take_focus = 1;
int managed_mode = 1; int managed_mode = 1;
int client_side_with_core = 1;
int client_side_with_render = 1;
int client_side_antialias_with_core = 1;
int client_side_antialias_with_render = 1;
unsigned int X11DRV_server_startticks; unsigned int X11DRV_server_startticks;
@ -252,6 +256,18 @@ static void setup_options(void)
if (!get_config_key( hkey, appkey, "Synchronous", buffer, sizeof(buffer) )) if (!get_config_key( hkey, appkey, "Synchronous", buffer, sizeof(buffer) ))
synchronous = IS_OPTION_TRUE( buffer[0] ); synchronous = IS_OPTION_TRUE( buffer[0] );
if (!get_config_key( hkey, appkey, "ClientSideWithCore", buffer, sizeof(buffer) ))
client_side_with_core = IS_OPTION_TRUE( buffer[0] );
if (!get_config_key( hkey, appkey, "ClientSideWithRender", buffer, sizeof(buffer) ))
client_side_with_render = IS_OPTION_TRUE( buffer[0] );
if (!get_config_key( hkey, appkey, "ClientSideAntiAliasWithCore", buffer, sizeof(buffer) ))
client_side_antialias_with_core = IS_OPTION_TRUE( buffer[0] );
if (!get_config_key( hkey, appkey, "ClientSideAntiAliasWithRender", buffer, sizeof(buffer) ))
client_side_antialias_with_render = IS_OPTION_TRUE( buffer[0] );
if (appkey) RegCloseKey( appkey ); if (appkey) RegCloseKey( appkey );
RegCloseKey( hkey ); RegCloseKey( hkey );
} }
@ -381,6 +397,8 @@ static void process_detach(void)
/* cleanup XVidMode */ /* cleanup XVidMode */
X11DRV_XF86VM_Cleanup(); X11DRV_XF86VM_Cleanup();
#endif #endif
if(using_client_side_fonts)
X11DRV_XRender_Finalize();
/* FIXME: should detach all threads */ /* FIXME: should detach all threads */
thread_detach(); thread_detach();

File diff suppressed because it is too large Load Diff

View File

@ -137,6 +137,18 @@ WINE REGISTRY Version 2
;; "XVideoPort" = "43" ;; "XVideoPort" = "43"
; Run in synchronous mode (useful for debugging X11 problems) ; Run in synchronous mode (useful for debugging X11 problems)
;;"Synchronous" = "Y" ;;"Synchronous" = "Y"
;
; Use the Render extension to render client side fonts (default "Y")
;;"ClientSideWithRender" = "Y"
; Fallback on X core requests to render client side fonts (default "Y")
;;"ClientSideWithCore" = "Y"
; Set both of the previous two to "N" in order to force X11 server side fonts
;
; Anti-alias fonts if using the Render extension (default "Y")
;;"ClientSideAntiAliasWithRender" = "Y"
; Anti-alias fonts if using core requests fallback (default "Y")
;;"ClientSideAntiAliasWithCore" = "Y"
;
[fonts] [fonts]
;Read the Fonts topic in the Wine User Guide before adding aliases ;Read the Fonts topic in the Wine User Guide before adding aliases

View File

@ -80,6 +80,9 @@ HBITMAP X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
if (!(bmp = GDI_GetObjPtr( hbitmap, BITMAP_MAGIC ))) return 0; if (!(bmp = GDI_GetObjPtr( hbitmap, BITMAP_MAGIC ))) return 0;
if(physDev->xrender)
X11DRV_XRender_UpdateDrawable( physDev );
if (hbitmap == GetStockObject(DEFAULT_BITMAP)) if (hbitmap == GetStockObject(DEFAULT_BITMAP))
physDev->drawable = BITMAP_stock_pixmap; physDev->drawable = BITMAP_stock_pixmap;
else else

View File

@ -136,12 +136,13 @@ void X11DRV_SetDrawable( HDC hdc, Drawable drawable, int mode, const POINT *org,
{ {
X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dc->physDev; X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dc->physDev;
if(physDev->xrender)
X11DRV_XRender_UpdateDrawable( physDev );
physDev->org = *org; physDev->org = *org;
physDev->drawable = drawable; physDev->drawable = drawable;
physDev->drawable_org = *drawable_org; physDev->drawable_org = *drawable_org;
TSXSetSubwindowMode( gdi_display, physDev->gc, mode ); TSXSetSubwindowMode( gdi_display, physDev->gc, mode );
if(physDev->xrender)
X11DRV_XRender_UpdateDrawable( physDev );
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
} }
} }

View File

@ -3007,7 +3007,7 @@ void X11DRV_FONT_Init( int *log_pixels_x, int *log_pixels_y )
{ {
XFONT_GetPointResolution( log_pixels_x, log_pixels_y ); XFONT_GetPointResolution( log_pixels_x, log_pixels_y );
if(X11DRV_XRender_Installed) if(using_client_side_fonts)
text_caps |= TC_VA_ABLE; text_caps |= TC_VA_ABLE;
return; return;
@ -3263,7 +3263,7 @@ HFONT X11DRV_SelectFont( X11DRV_PDEVICE *physDev, HFONT hfont )
TRACE("dc->gdiFont = %p\n", dc->gdiFont); TRACE("dc->gdiFont = %p\n", dc->gdiFont);
if(dc->gdiFont && X11DRV_XRender_Installed) { if(dc->gdiFont && using_client_side_fonts) {
X11DRV_XRender_SelectFont(physDev, hfont); X11DRV_XRender_SelectFont(physDev, hfont);
return FALSE; return FALSE;
} }

View File

@ -212,7 +212,11 @@ extern const int X11DRV_XROPfunction[];
extern void _XInitImageFuncPtrs(XImage *); extern void _XInitImageFuncPtrs(XImage *);
extern BOOL X11DRV_XRender_Installed; extern int client_side_with_core;
extern int client_side_with_render;
extern int client_side_antialias_with_core;
extern int client_side_antialias_with_render;
extern int using_client_side_fonts;
extern void X11DRV_XRender_Init(void); extern void X11DRV_XRender_Init(void);
extern void X11DRV_XRender_Finalize(void); extern void X11DRV_XRender_Finalize(void);
extern BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE*, HFONT); extern BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE*, HFONT);