Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3807ca73
Commit
3807ca73
authored
Dec 31, 2008
by
Byeongsik Jeon
Committed by
Alexandre Julliard
Dec 31, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Add the basic antialias type decision code.
parent
04b8ec07
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
14 deletions
+56
-14
xrender.c
dlls/winex11.drv/xrender.c
+54
-14
wingdi.h
include/wingdi.h
+2
-0
No files found.
dlls/winex11.drv/xrender.c
View file @
3807ca73
...
...
@@ -451,14 +451,45 @@ static BOOL get_gasp_flags(X11DRV_PDEVICE *physDev, WORD *flags)
return
TRUE
;
}
static
AA_Type
get_antialias_type
(
X11DRV_PDEVICE
*
physDev
,
BOOL
subpixel
,
BOOL
hinter
)
{
AA_Type
ret
;
WORD
flags
;
UINT
font_smoothing_type
,
font_smoothing_orientation
;
if
(
X11DRV_XRender_Installed
&&
subpixel
&&
SystemParametersInfoW
(
SPI_GETFONTSMOOTHINGTYPE
,
0
,
&
font_smoothing_type
,
0
)
&&
font_smoothing_type
==
FE_FONTSMOOTHINGCLEARTYPE
)
{
if
(
SystemParametersInfoW
(
SPI_GETFONTSMOOTHINGORIENTATION
,
0
,
&
font_smoothing_orientation
,
0
)
&&
font_smoothing_orientation
==
FE_FONTSMOOTHINGORIENTATIONBGR
)
{
ret
=
AA_BGR
;
}
else
ret
=
AA_RGB
;
/*FIXME
If the monitor is in portrait mode, ClearType is disabled in the MS Windows (MSDN).
But, Wine's subpixel rendering can support the portrait mode.
*/
}
else
if
(
!
hinter
||
!
get_gasp_flags
(
physDev
,
&
flags
)
||
flags
&
GASP_DOGRAY
)
ret
=
AA_Grey
;
else
ret
=
AA_None
;
return
ret
;
}
static
int
GetCacheEntry
(
X11DRV_PDEVICE
*
physDev
,
LFANDSIZE
*
plfsz
)
{
int
ret
;
int
format
;
gsCacheEntry
*
entry
;
WORD
flags
;
static
int
hinter
=
-
1
;
static
int
subpixel
=
-
1
;
BOOL
font_smoothing
;
if
((
ret
=
LookupEntry
(
plfsz
))
!=
-
1
)
return
ret
;
...
...
@@ -479,19 +510,28 @@ static int GetCacheEntry(X11DRV_PDEVICE *physDev, LFANDSIZE *plfsz)
subpixel
=
status
.
wFlags
&
WINE_TT_SUBPIXEL_RENDERING_ENABLED
;
}
/* FIXME: Use the following registry information
[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2" ; 0=>Off, 2=>On
"FontSmoothingType"=dword:00000002 ; 1=>Standard, 2=>Cleartype
"FontSmoothingOrientation"=dword:00000001 ; 0=>BGR, 1=>RGB
"FontSmoothingGamma"=dword:00000578
*/
if
(
subpixel
&&
X11DRV_XRender_Installed
)
entry
->
aa_default
=
AA_RGB
;
else
if
(
!
hinter
||
!
get_gasp_flags
(
physDev
,
&
flags
)
||
flags
&
GASP_DOGRAY
)
entry
->
aa_default
=
AA_Grey
;
else
entry
->
aa_default
=
AA_None
;
switch
(
plfsz
->
lf
.
lfQuality
)
{
case
ANTIALIASED_QUALITY
:
entry
->
aa_default
=
get_antialias_type
(
physDev
,
FALSE
,
hinter
);
break
;
case
CLEARTYPE_QUALITY
:
case
CLEARTYPE_NATURAL_QUALITY
:
entry
->
aa_default
=
get_antialias_type
(
physDev
,
subpixel
,
hinter
);
break
;
case
DEFAULT_QUALITY
:
case
DRAFT_QUALITY
:
case
PROOF_QUALITY
:
default:
if
(
SystemParametersInfoW
(
SPI_GETFONTSMOOTHING
,
0
,
&
font_smoothing
,
0
)
&&
font_smoothing
)
{
entry
->
aa_default
=
get_antialias_type
(
physDev
,
subpixel
,
hinter
);
}
else
entry
->
aa_default
=
AA_None
;
break
;
}
}
else
entry
->
aa_default
=
AA_None
;
...
...
include/wingdi.h
View file @
3807ca73
...
...
@@ -771,6 +771,8 @@ typedef struct tagXFORM
#define PROOF_QUALITY 2
#define NONANTIALIASED_QUALITY 3
#define ANTIALIASED_QUALITY 4
#define CLEARTYPE_QUALITY 5
#define CLEARTYPE_NATURAL_QUALITY 6
/* lfPitchAndFamily pitch values */
#define DEFAULT_PITCH 0x00
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment