Client side render fonts for XServers without the Render extension
using X11 core requests.
This commit is contained in:
parent
3f61afbbc8
commit
94705862d6
|
@ -60,6 +60,10 @@ Window root_window;
|
|||
int dxgrab, usedga, usexvidmode;
|
||||
int use_take_focus = 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;
|
||||
|
||||
|
@ -252,6 +256,18 @@ static void setup_options(void)
|
|||
if (!get_config_key( hkey, appkey, "Synchronous", buffer, sizeof(buffer) ))
|
||||
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 );
|
||||
RegCloseKey( hkey );
|
||||
}
|
||||
|
@ -381,6 +397,8 @@ static void process_detach(void)
|
|||
/* cleanup XVidMode */
|
||||
X11DRV_XF86VM_Cleanup();
|
||||
#endif
|
||||
if(using_client_side_fonts)
|
||||
X11DRV_XRender_Finalize();
|
||||
|
||||
/* FIXME: should detach all threads */
|
||||
thread_detach();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -137,6 +137,18 @@ WINE REGISTRY Version 2
|
|||
;; "XVideoPort" = "43"
|
||||
; Run in synchronous mode (useful for debugging X11 problems)
|
||||
;;"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]
|
||||
;Read the Fonts topic in the Wine User Guide before adding aliases
|
||||
|
|
|
@ -80,6 +80,9 @@ HBITMAP X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
|
|||
|
||||
if (!(bmp = GDI_GetObjPtr( hbitmap, BITMAP_MAGIC ))) return 0;
|
||||
|
||||
if(physDev->xrender)
|
||||
X11DRV_XRender_UpdateDrawable( physDev );
|
||||
|
||||
if (hbitmap == GetStockObject(DEFAULT_BITMAP))
|
||||
physDev->drawable = BITMAP_stock_pixmap;
|
||||
else
|
||||
|
|
|
@ -136,12 +136,13 @@ void X11DRV_SetDrawable( HDC hdc, Drawable drawable, int mode, const POINT *org,
|
|||
{
|
||||
X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dc->physDev;
|
||||
|
||||
if(physDev->xrender)
|
||||
X11DRV_XRender_UpdateDrawable( physDev );
|
||||
|
||||
physDev->org = *org;
|
||||
physDev->drawable = drawable;
|
||||
physDev->drawable_org = *drawable_org;
|
||||
TSXSetSubwindowMode( gdi_display, physDev->gc, mode );
|
||||
if(physDev->xrender)
|
||||
X11DRV_XRender_UpdateDrawable( physDev );
|
||||
GDI_ReleaseObj( hdc );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3007,7 +3007,7 @@ void X11DRV_FONT_Init( int *log_pixels_x, int *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;
|
||||
|
||||
return;
|
||||
|
@ -3263,7 +3263,7 @@ HFONT X11DRV_SelectFont( X11DRV_PDEVICE *physDev, HFONT hfont )
|
|||
|
||||
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);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -212,7 +212,11 @@ extern const int X11DRV_XROPfunction[];
|
|||
|
||||
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_Finalize(void);
|
||||
extern BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE*, HFONT);
|
||||
|
|
Loading…
Reference in New Issue