Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
00647af5
Commit
00647af5
authored
Jul 08, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Use the HDC from the gdi_physdev structure.
parent
6c951b7d
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
92 additions
and
98 deletions
+92
-98
bitblt.c
dlls/winex11.drv/bitblt.c
+11
-11
brush.c
dlls/winex11.drv/brush.c
+4
-4
dib.c
dlls/winex11.drv/dib.c
+7
-7
graphics.c
dlls/winex11.drv/graphics.c
+28
-28
init.c
dlls/winex11.drv/init.c
+4
-7
opengl.c
dlls/winex11.drv/opengl.c
+13
-13
palette.c
dlls/winex11.drv/palette.c
+7
-9
pen.c
dlls/winex11.drv/pen.c
+2
-2
text.c
dlls/winex11.drv/text.c
+1
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-1
xfont.c
dlls/winex11.drv/xfont.c
+2
-2
xrender.c
dlls/winex11.drv/xrender.c
+13
-13
No files found.
dlls/winex11.drv/bitblt.c
View file @
00647af5
...
...
@@ -542,7 +542,7 @@ static void get_colors(X11DRV_PDEVICE *physDevDst, X11DRV_PDEVICE *physDevSrc,
*
fg
=
physDevDst
->
textPixel
;
*
bg
=
physDevDst
->
backgroundPixel
;
if
(
physDevSrc
->
depth
==
1
)
{
if
(
GetDIBColorTable
(
physDevSrc
->
hdc
,
0
,
2
,
rgb
)
==
2
)
{
if
(
GetDIBColorTable
(
physDevSrc
->
dev
.
hdc
,
0
,
2
,
rgb
)
==
2
)
{
DWORD
logcolor
;
logcolor
=
RGB
(
rgb
[
0
].
rgbRed
,
rgb
[
0
].
rgbGreen
,
rgb
[
0
].
rgbBlue
);
*
fg
=
X11DRV_PALETTE_ToPhysical
(
physDevDst
,
logcolor
);
...
...
@@ -918,7 +918,7 @@ static int BITBLT_GetSrcAreaStretch( X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE
BITBLT_StretchImage
(
imageSrc
,
imageDst
,
src
->
width
,
src
->
height
,
dst
->
width
,
dst
->
height
,
&
rectSrc
,
&
rectDst
,
fg
,
physDevDst
->
depth
!=
1
?
bg
:
physDevSrc
->
backgroundPixel
,
image_pixel_mask
(
physDevSrc
),
GetStretchBltMode
(
physDevDst
->
hdc
)
);
image_pixel_mask
(
physDevSrc
),
GetStretchBltMode
(
physDevDst
->
dev
.
hdc
)
);
wine_tsx11_lock
();
XPutImage
(
gdi_display
,
pixmap
,
gc
,
imageDst
,
0
,
0
,
0
,
0
,
rectDst
.
right
-
rectDst
.
left
,
rectDst
.
bottom
-
rectDst
.
top
);
...
...
@@ -944,7 +944,7 @@ static int BITBLT_GetSrcArea( X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDe
INT
width
=
visRectSrc
->
right
-
visRectSrc
->
left
;
INT
height
=
visRectSrc
->
bottom
-
visRectSrc
->
top
;
int
fg
,
bg
;
BOOL
memdc
=
(
GetObjectType
(
physDevSrc
->
hdc
)
==
OBJ_MEMDC
);
BOOL
memdc
=
(
GetObjectType
(
physDevSrc
->
dev
.
hdc
)
==
OBJ_MEMDC
);
if
(
physDevSrc
->
depth
==
physDevDst
->
depth
)
{
...
...
@@ -1074,7 +1074,7 @@ static int BITBLT_GetDstArea(X11DRV_PDEVICE *physDev, Pixmap pixmap, GC gc, RECT
int
exposures
=
0
;
INT
width
=
visRectDst
->
right
-
visRectDst
->
left
;
INT
height
=
visRectDst
->
bottom
-
visRectDst
->
top
;
BOOL
memdc
=
(
GetObjectType
(
physDev
->
hdc
)
==
OBJ_MEMDC
);
BOOL
memdc
=
(
GetObjectType
(
physDev
->
dev
.
hdc
)
==
OBJ_MEMDC
);
wine_tsx11_lock
();
...
...
@@ -1182,7 +1182,7 @@ static BOOL BITBLT_GetVisRectangles( X11DRV_PDEVICE *physDevDst, X11DRV_PDEVICE
rect
.
top
=
dst
->
y
;
rect
.
right
=
dst
->
x
+
dst
->
width
;
rect
.
bottom
=
dst
->
y
+
dst
->
height
;
LPtoDP
(
physDevDst
->
hdc
,
(
POINT
*
)
&
rect
,
2
);
LPtoDP
(
physDevDst
->
dev
.
hdc
,
(
POINT
*
)
&
rect
,
2
);
dst
->
x
=
rect
.
left
;
dst
->
y
=
rect
.
top
;
dst
->
width
=
rect
.
right
-
rect
.
left
;
...
...
@@ -1207,7 +1207,7 @@ static BOOL BITBLT_GetVisRectangles( X11DRV_PDEVICE *physDevDst, X11DRV_PDEVICE
rect
.
top
=
src
->
y
;
rect
.
right
=
src
->
x
+
src
->
width
;
rect
.
bottom
=
src
->
y
+
src
->
height
;
LPtoDP
(
physDevSrc
->
hdc
,
(
POINT
*
)
&
rect
,
2
);
LPtoDP
(
physDevSrc
->
dev
.
hdc
,
(
POINT
*
)
&
rect
,
2
);
src
->
x
=
rect
.
left
;
src
->
y
=
rect
.
top
;
src
->
width
=
rect
.
right
-
rect
.
left
;
...
...
@@ -1419,7 +1419,7 @@ BOOL CDECL X11DRV_PatBlt( PHYSDEV dev, INT x, INT y, INT width, INT height, DWOR
dst
.
y
=
y
;
dst
.
width
=
width
;
dst
.
height
=
height
;
dst
.
layout
=
GetLayout
(
physD
ev
->
hdc
);
dst
.
layout
=
GetLayout
(
d
ev
->
hdc
);
if
(
rop
&
NOMIRRORBITMAP
)
{
...
...
@@ -1507,12 +1507,12 @@ BOOL CDECL X11DRV_StretchBlt( PHYSDEV dst_dev, INT xDst, INT yDst, INT widthDst,
src
.
y
=
ySrc
;
src
.
width
=
widthSrc
;
src
.
height
=
heightSrc
;
src
.
layout
=
GetLayout
(
physDevSrc
->
hdc
);
src
.
layout
=
GetLayout
(
src_dev
->
hdc
);
dst
.
x
=
xDst
;
dst
.
y
=
yDst
;
dst
.
width
=
widthDst
;
dst
.
height
=
heightDst
;
dst
.
layout
=
GetLayout
(
physDevDst
->
hdc
);
dst
.
layout
=
GetLayout
(
dst_dev
->
hdc
);
if
(
rop
&
NOMIRRORBITMAP
)
{
...
...
@@ -1699,12 +1699,12 @@ BOOL CDECL X11DRV_AlphaBlend( PHYSDEV dst_dev, INT xDst, INT yDst, INT widthDst,
src
.
y
=
ySrc
;
src
.
width
=
widthSrc
;
src
.
height
=
heightSrc
;
src
.
layout
=
GetLayout
(
physDevSrc
->
hdc
);
src
.
layout
=
GetLayout
(
src_dev
->
hdc
);
dst
.
x
=
xDst
;
dst
.
y
=
yDst
;
dst
.
width
=
widthDst
;
dst
.
height
=
heightDst
;
dst
.
layout
=
GetLayout
(
physDevDst
->
hdc
);
dst
.
layout
=
GetLayout
(
dst_dev
->
hdc
);
if
(
!
BITBLT_GetVisRectangles
(
physDevDst
,
physDevSrc
,
&
dst
,
&
src
))
return
TRUE
;
...
...
dlls/winex11.drv/brush.c
View file @
00647af5
...
...
@@ -259,7 +259,7 @@ HBRUSH CDECL X11DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush )
if
(
!
GetObjectA
(
hbrush
,
sizeof
(
logbrush
),
&
logbrush
))
return
0
;
TRACE
(
"hdc=%p hbrush=%p
\n
"
,
physDev
->
hdc
,
hbrush
);
TRACE
(
"hdc=%p hbrush=%p
\n
"
,
dev
->
hdc
,
hbrush
);
if
(
physDev
->
brush
.
pixmap
)
{
...
...
@@ -270,7 +270,7 @@ HBRUSH CDECL X11DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush )
}
physDev
->
brush
.
style
=
logbrush
.
lbStyle
;
if
(
hbrush
==
GetStockObject
(
DC_BRUSH
))
logbrush
.
lbColor
=
GetDCBrushColor
(
physD
ev
->
hdc
);
logbrush
.
lbColor
=
GetDCBrushColor
(
d
ev
->
hdc
);
switch
(
logbrush
.
lbStyle
)
{
...
...
@@ -303,7 +303,7 @@ HBRUSH CDECL X11DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush )
if
((
bmpInfo
=
GlobalLock
(
(
HGLOBAL
)
logbrush
.
lbHatch
)))
{
int
size
=
bitmap_info_size
(
bmpInfo
,
logbrush
.
lbColor
);
hBitmap
=
CreateDIBitmap
(
physD
ev
->
hdc
,
&
bmpInfo
->
bmiHeader
,
hBitmap
=
CreateDIBitmap
(
d
ev
->
hdc
,
&
bmpInfo
->
bmiHeader
,
CBM_INIT
,
((
char
*
)
bmpInfo
)
+
size
,
bmpInfo
,
(
WORD
)
logbrush
.
lbColor
);
...
...
@@ -325,7 +325,7 @@ COLORREF CDECL X11DRV_SetDCBrushColor( PHYSDEV dev, COLORREF crColor )
{
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
if
(
GetCurrentObject
(
physD
ev
->
hdc
,
OBJ_BRUSH
)
==
GetStockObject
(
DC_BRUSH
))
if
(
GetCurrentObject
(
d
ev
->
hdc
,
OBJ_BRUSH
)
==
GetStockObject
(
DC_BRUSH
))
BRUSH_SelectSolidBrush
(
physDev
,
crColor
);
return
crColor
;
...
...
dlls/winex11.drv/dib.c
View file @
00647af5
...
...
@@ -361,7 +361,7 @@ static int *X11DRV_DIB_GenColorMap( X11DRV_PDEVICE *physDev, int *colorMapping,
BOOL
invert
=
FALSE
;
RGBQUAD
table
[
2
];
if
(
GetDIBColorTable
(
physDev
->
hdc
,
0
,
2
,
table
)
==
2
)
if
(
GetDIBColorTable
(
physDev
->
dev
.
hdc
,
0
,
2
,
table
)
==
2
)
invert
=
!
colour_is_brighter
(
table
[
1
],
table
[
0
]);
for
(
i
=
start
;
i
<
end
;
i
++
,
rgb
++
)
...
...
@@ -385,7 +385,7 @@ static int *X11DRV_DIB_GenColorMap( X11DRV_PDEVICE *physDev, int *colorMapping,
BOOL
invert
=
FALSE
;
RGBQUAD
table
[
2
];
if
(
GetDIBColorTable
(
physDev
->
hdc
,
0
,
2
,
table
)
==
2
)
if
(
GetDIBColorTable
(
physDev
->
dev
.
hdc
,
0
,
2
,
table
)
==
2
)
invert
=
!
colour_is_brighter
(
table
[
1
],
table
[
0
]);
for
(
i
=
start
;
i
<
end
;
i
++
,
rgb
++
)
...
...
@@ -3853,7 +3853,7 @@ INT CDECL X11DRV_SetDIBitsToDevice( PHYSDEV dev, INT xDest, INT yDest, DWORD cx,
LONG
width
,
height
;
BOOL
top_down
;
POINT
pt
;
int
rop
=
X11DRV_XROPfunction
[
GetROP2
(
physD
ev
->
hdc
)
-
1
];
int
rop
=
X11DRV_XROPfunction
[
GetROP2
(
d
ev
->
hdc
)
-
1
];
if
(
DIB_GetBitmapInfo
(
&
info
->
bmiHeader
,
&
width
,
&
height
,
&
descr
.
infoBpp
,
&
descr
.
compression
)
==
-
1
)
...
...
@@ -3864,7 +3864,7 @@ INT CDECL X11DRV_SetDIBitsToDevice( PHYSDEV dev, INT xDest, INT yDest, DWORD cx,
pt
.
x
=
xDest
;
pt
.
y
=
yDest
;
LPtoDP
(
physD
ev
->
hdc
,
&
pt
,
1
);
LPtoDP
(
d
ev
->
hdc
,
&
pt
,
1
);
if
(
!
lines
||
(
startscan
>=
height
))
return
0
;
if
(
!
top_down
&&
startscan
+
lines
>
height
)
lines
=
height
-
startscan
;
...
...
@@ -4117,7 +4117,7 @@ INT CDECL X11DRV_GetDIBits( PHYSDEV dev, HBITMAP hbitmap, UINT startscan, UINT l
if
(
physBitmap
->
pixmap_depth
>
1
)
{
GetPaletteEntries
(
GetCurrentObject
(
physD
ev
->
hdc
,
OBJ_PAL
),
0
,
256
,
palette
);
GetPaletteEntries
(
GetCurrentObject
(
d
ev
->
hdc
,
OBJ_PAL
),
0
,
256
,
palette
);
}
else
{
...
...
@@ -4342,7 +4342,7 @@ void X11DRV_DIB_CopyDIBSection(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physD
int
*
x11ColorMap
;
int
freeColorMap
;
TRACE
(
"(%p,%p,%d,%d,%d,%d,%d,%d)
\n
"
,
physDevSrc
->
hdc
,
physDevDst
->
hdc
,
TRACE
(
"(%p,%p,%d,%d,%d,%d,%d,%d)
\n
"
,
physDevSrc
->
dev
.
hdc
,
physDevDst
->
dev
.
hdc
,
xSrc
,
ySrc
,
xDest
,
yDest
,
width
,
height
);
/* this function is meant as an optimization for BitBlt,
* not to be called otherwise */
...
...
@@ -4363,7 +4363,7 @@ void X11DRV_DIB_CopyDIBSection(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physD
/* if the source bitmap is 8bpp or less, we're supposed to use the
* DC's palette for color conversion (not the DIB color table) */
if
(
dib
.
dsBm
.
bmBitsPixel
<=
8
)
{
HPALETTE
hPalette
=
GetCurrentObject
(
physDevSrc
->
hdc
,
OBJ_PAL
);
HPALETTE
hPalette
=
GetCurrentObject
(
physDevSrc
->
dev
.
hdc
,
OBJ_PAL
);
if
(
!
hPalette
||
(
hPalette
==
GetStockObject
(
DEFAULT_PALETTE
)))
{
/* HACK: no palette has been set in the source DC,
* use the DIB colormap instead - this is necessary in some
...
...
dlls/winex11.drv/graphics.c
View file @
00647af5
...
...
@@ -242,7 +242,7 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
val
.
background
=
X11DRV_PALETTE_XPixelToPalette
[
val
.
background
];
}
val
.
function
=
X11DRV_XROPfunction
[
GetROP2
(
physDev
->
hdc
)
-
1
];
val
.
function
=
X11DRV_XROPfunction
[
GetROP2
(
physDev
->
dev
.
hdc
)
-
1
];
/*
** Let's replace GXinvert by GXxor with (black xor white)
** This solves the selection color and leak problems in excel
...
...
@@ -259,7 +259,7 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
{
case
FillStippled
:
case
FillOpaqueStippled
:
if
(
GetBkMode
(
physDev
->
hdc
)
==
OPAQUE
)
val
.
fill_style
=
FillOpaqueStippled
;
if
(
GetBkMode
(
physDev
->
dev
.
hdc
)
==
OPAQUE
)
val
.
fill_style
=
FillOpaqueStippled
;
val
.
stipple
=
physDev
->
brush
.
pixmap
;
mask
=
GCStipple
;
break
;
...
...
@@ -290,10 +290,10 @@ BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors )
mask
=
0
;
break
;
}
GetBrushOrgEx
(
physDev
->
hdc
,
&
pt
);
GetBrushOrgEx
(
physDev
->
dev
.
hdc
,
&
pt
);
val
.
ts_x_origin
=
physDev
->
dc_rect
.
left
+
pt
.
x
;
val
.
ts_y_origin
=
physDev
->
dc_rect
.
top
+
pt
.
y
;
val
.
fill_rule
=
(
GetPolyFillMode
(
physDev
->
hdc
)
==
WINDING
)
?
WindingRule
:
EvenOddRule
;
val
.
fill_rule
=
(
GetPolyFillMode
(
physDev
->
dev
.
hdc
)
==
WINDING
)
?
WindingRule
:
EvenOddRule
;
wine_tsx11_lock
();
XChangeGC
(
gdi_display
,
gc
,
GCFunction
|
GCForeground
|
GCBackground
|
GCFillStyle
|
...
...
@@ -326,7 +326,7 @@ BOOL X11DRV_SetupGCForBrush( X11DRV_PDEVICE *physDev )
static
BOOL
X11DRV_SetupGCForPen
(
X11DRV_PDEVICE
*
physDev
)
{
XGCValues
val
;
UINT
rop2
=
GetROP2
(
physDev
->
hdc
);
UINT
rop2
=
GetROP2
(
physDev
->
dev
.
hdc
);
if
(
physDev
->
pen
.
style
==
PS_NULL
)
return
FALSE
;
...
...
@@ -386,7 +386,7 @@ static BOOL X11DRV_SetupGCForPen( X11DRV_PDEVICE *physDev )
}
if
(
physDev
->
pen
.
dash_len
)
val
.
line_style
=
((
GetBkMode
(
physDev
->
hdc
)
==
OPAQUE
)
&&
(
!
physDev
->
pen
.
ext
))
val
.
line_style
=
((
GetBkMode
(
physDev
->
dev
.
hdc
)
==
OPAQUE
)
&&
(
!
physDev
->
pen
.
ext
))
?
LineDoubleDash
:
LineOnOffDash
;
else
val
.
line_style
=
LineSolid
;
...
...
@@ -446,7 +446,7 @@ INT X11DRV_XWStoDS( X11DRV_PDEVICE *physDev, INT width )
pt
[
0
].
y
=
0
;
pt
[
1
].
x
=
width
;
pt
[
1
].
y
=
0
;
LPtoDP
(
physDev
->
hdc
,
pt
,
2
);
LPtoDP
(
physDev
->
dev
.
hdc
,
pt
,
2
);
return
pt
[
1
].
x
-
pt
[
0
].
x
;
}
...
...
@@ -463,7 +463,7 @@ INT X11DRV_YWStoDS( X11DRV_PDEVICE *physDev, INT height )
pt
[
0
].
y
=
0
;
pt
[
1
].
x
=
0
;
pt
[
1
].
y
=
height
;
LPtoDP
(
physDev
->
hdc
,
pt
,
2
);
LPtoDP
(
physDev
->
dev
.
hdc
,
pt
,
2
);
return
pt
[
1
].
y
-
pt
[
0
].
y
;
}
...
...
@@ -479,10 +479,10 @@ BOOL CDECL X11DRV_LineTo( PHYSDEV dev, INT x, INT y )
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection
(
physDev
,
DIB_Status_GdiMod
);
GetCurrentPositionEx
(
physD
ev
->
hdc
,
&
pt
[
0
]
);
GetCurrentPositionEx
(
d
ev
->
hdc
,
&
pt
[
0
]
);
pt
[
1
].
x
=
x
;
pt
[
1
].
y
=
y
;
LPtoDP
(
physD
ev
->
hdc
,
pt
,
2
);
LPtoDP
(
d
ev
->
hdc
,
pt
,
2
);
wine_tsx11_lock
();
XDrawLine
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
...
...
@@ -515,19 +515,19 @@ static BOOL X11DRV_DrawArc( PHYSDEV dev, INT left, INT top, INT right, INT botto
XPoint
points
[
4
];
BOOL
update
=
FALSE
;
POINT
start
,
end
;
RECT
rc
=
get_device_rect
(
physD
ev
->
hdc
,
left
,
top
,
right
,
bottom
);
RECT
rc
=
get_device_rect
(
d
ev
->
hdc
,
left
,
top
,
right
,
bottom
);
start
.
x
=
xstart
;
start
.
y
=
ystart
;
end
.
x
=
xend
;
end
.
y
=
yend
;
LPtoDP
(
physD
ev
->
hdc
,
&
start
,
1
);
LPtoDP
(
physD
ev
->
hdc
,
&
end
,
1
);
LPtoDP
(
d
ev
->
hdc
,
&
start
,
1
);
LPtoDP
(
d
ev
->
hdc
,
&
end
,
1
);
if
((
rc
.
left
==
rc
.
right
)
||
(
rc
.
top
==
rc
.
bottom
)
||
(
lines
&&
((
rc
.
right
-
rc
.
left
==
1
)
||
(
rc
.
bottom
-
rc
.
top
==
1
))))
return
TRUE
;
if
(
GetArcDirection
(
physD
ev
->
hdc
)
==
AD_CLOCKWISE
)
if
(
GetArcDirection
(
d
ev
->
hdc
)
==
AD_CLOCKWISE
)
{
POINT
tmp
=
start
;
start
=
end
;
end
=
tmp
;
}
oldwidth
=
width
=
physDev
->
pen
.
width
;
...
...
@@ -695,7 +695,7 @@ BOOL CDECL X11DRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
INT
width
,
oldwidth
;
BOOL
update
=
FALSE
;
RECT
rc
=
get_device_rect
(
physD
ev
->
hdc
,
left
,
top
,
right
,
bottom
);
RECT
rc
=
get_device_rect
(
d
ev
->
hdc
,
left
,
top
,
right
,
bottom
);
if
((
rc
.
left
==
rc
.
right
)
||
(
rc
.
top
==
rc
.
bottom
))
return
TRUE
;
...
...
@@ -753,7 +753,7 @@ BOOL CDECL X11DRV_Rectangle(PHYSDEV dev, INT left, INT top, INT right, INT botto
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
INT
width
,
oldwidth
,
oldjoinstyle
;
BOOL
update
=
FALSE
;
RECT
rc
=
get_device_rect
(
physD
ev
->
hdc
,
left
,
top
,
right
,
bottom
);
RECT
rc
=
get_device_rect
(
d
ev
->
hdc
,
left
,
top
,
right
,
bottom
);
TRACE
(
"(%d %d %d %d)
\n
"
,
left
,
top
,
right
,
bottom
);
...
...
@@ -822,7 +822,7 @@ BOOL CDECL X11DRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
INT
width
,
oldwidth
,
oldendcap
;
BOOL
update
=
FALSE
;
POINT
pts
[
2
];
RECT
rc
=
get_device_rect
(
physD
ev
->
hdc
,
left
,
top
,
right
,
bottom
);
RECT
rc
=
get_device_rect
(
d
ev
->
hdc
,
left
,
top
,
right
,
bottom
);
TRACE
(
"(%d %d %d %d %d %d
\n
"
,
left
,
top
,
right
,
bottom
,
ell_width
,
ell_height
);
...
...
@@ -835,7 +835,7 @@ BOOL CDECL X11DRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
pts
[
0
].
x
=
pts
[
0
].
y
=
0
;
pts
[
1
].
x
=
ell_width
;
pts
[
1
].
y
=
ell_height
;
LPtoDP
(
physD
ev
->
hdc
,
pts
,
2
);
LPtoDP
(
d
ev
->
hdc
,
pts
,
2
);
ell_width
=
max
(
abs
(
pts
[
1
].
x
-
pts
[
0
].
x
),
1
);
ell_height
=
max
(
abs
(
pts
[
1
].
y
-
pts
[
0
].
y
),
1
);
...
...
@@ -1025,7 +1025,7 @@ COLORREF CDECL X11DRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color )
pt
.
x
=
x
;
pt
.
y
=
y
;
LPtoDP
(
physD
ev
->
hdc
,
&
pt
,
1
);
LPtoDP
(
d
ev
->
hdc
,
&
pt
,
1
);
pixel
=
X11DRV_PALETTE_ToPhysical
(
physDev
,
color
);
/* Update the pixmap from the DIB section */
...
...
@@ -1056,11 +1056,11 @@ COLORREF CDECL X11DRV_GetPixel( PHYSDEV dev, INT x, INT y )
XImage
*
image
;
int
pixel
;
POINT
pt
;
BOOL
memdc
=
(
GetObjectType
(
physD
ev
->
hdc
)
==
OBJ_MEMDC
);
BOOL
memdc
=
(
GetObjectType
(
d
ev
->
hdc
)
==
OBJ_MEMDC
);
pt
.
x
=
x
;
pt
.
y
=
y
;
LPtoDP
(
physD
ev
->
hdc
,
&
pt
,
1
);
LPtoDP
(
d
ev
->
hdc
,
&
pt
,
1
);
/* Update the pixmap from the DIB section */
X11DRV_LockDIBSection
(
physDev
,
DIB_Status_GdiMod
);
...
...
@@ -1109,7 +1109,7 @@ BOOL CDECL X11DRV_PaintRgn( PHYSDEV dev, HRGN hrgn )
{
unsigned
int
i
;
XRectangle
*
rect
;
RGNDATA
*
data
=
X11DRV_GetRegionData
(
hrgn
,
physD
ev
->
hdc
);
RGNDATA
*
data
=
X11DRV_GetRegionData
(
hrgn
,
d
ev
->
hdc
);
if
(
!
data
)
return
FALSE
;
rect
=
(
XRectangle
*
)
data
->
Buffer
;
...
...
@@ -1146,7 +1146,7 @@ BOOL CDECL X11DRV_Polyline( PHYSDEV dev, const POINT* pt, INT count )
for
(
i
=
0
;
i
<
count
;
i
++
)
{
POINT
tmp
=
pt
[
i
];
LPtoDP
(
physD
ev
->
hdc
,
&
tmp
,
1
);
LPtoDP
(
d
ev
->
hdc
,
&
tmp
,
1
);
points
[
i
].
x
=
physDev
->
dc_rect
.
left
+
tmp
.
x
;
points
[
i
].
y
=
physDev
->
dc_rect
.
top
+
tmp
.
y
;
}
...
...
@@ -1184,7 +1184,7 @@ BOOL CDECL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count )
for
(
i
=
0
;
i
<
count
;
i
++
)
{
POINT
tmp
=
pt
[
i
];
LPtoDP
(
physD
ev
->
hdc
,
&
tmp
,
1
);
LPtoDP
(
d
ev
->
hdc
,
&
tmp
,
1
);
points
[
i
].
x
=
physDev
->
dc_rect
.
left
+
tmp
.
x
;
points
[
i
].
y
=
physDev
->
dc_rect
.
top
+
tmp
.
y
;
}
...
...
@@ -1229,7 +1229,7 @@ BOOL CDECL X11DRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts,
/* FIXME: The points should be converted to device coords before */
/* creating the region. */
hrgn
=
CreatePolyPolygonRgn
(
pt
,
counts
,
polygons
,
GetPolyFillMode
(
physD
ev
->
hdc
)
);
hrgn
=
CreatePolyPolygonRgn
(
pt
,
counts
,
polygons
,
GetPolyFillMode
(
d
ev
->
hdc
)
);
X11DRV_PaintRgn
(
dev
,
hrgn
);
DeleteObject
(
hrgn
);
...
...
@@ -1255,7 +1255,7 @@ BOOL CDECL X11DRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts,
for
(
j
=
0
;
j
<
counts
[
i
];
j
++
)
{
POINT
tmp
=
*
pt
;
LPtoDP
(
physD
ev
->
hdc
,
&
tmp
,
1
);
LPtoDP
(
d
ev
->
hdc
,
&
tmp
,
1
);
points
[
j
].
x
=
physDev
->
dc_rect
.
left
+
tmp
.
x
;
points
[
j
].
y
=
physDev
->
dc_rect
.
top
+
tmp
.
y
;
pt
++
;
...
...
@@ -1302,7 +1302,7 @@ BOOL CDECL X11DRV_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* count
for
(
j
=
0
;
j
<
counts
[
i
];
j
++
)
{
POINT
tmp
=
*
pt
;
LPtoDP
(
physD
ev
->
hdc
,
&
tmp
,
1
);
LPtoDP
(
d
ev
->
hdc
,
&
tmp
,
1
);
points
[
j
].
x
=
physDev
->
dc_rect
.
left
+
tmp
.
x
;
points
[
j
].
y
=
physDev
->
dc_rect
.
top
+
tmp
.
y
;
pt
++
;
...
...
@@ -1410,7 +1410,7 @@ BOOL CDECL X11DRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT
pt
.
x
=
x
;
pt
.
y
=
y
;
LPtoDP
(
physD
ev
->
hdc
,
&
pt
,
1
);
LPtoDP
(
d
ev
->
hdc
,
&
pt
,
1
);
if
(
!
PtInRegion
(
physDev
->
region
,
pt
.
x
,
pt
.
y
))
return
FALSE
;
GetRgnBox
(
physDev
->
region
,
&
rect
);
...
...
dlls/winex11.drv/init.c
View file @
00647af5
...
...
@@ -129,7 +129,6 @@ BOOL CDECL X11DRV_CreateDC( HDC hdc, X11DRV_PDEVICE **pdev, LPCWSTR driver, LPCW
if
(
!
physDev
)
return
FALSE
;
*
pdev
=
physDev
;
physDev
->
hdc
=
hdc
;
if
(
GetObjectType
(
hdc
)
==
OBJ_MEMDC
)
{
...
...
@@ -187,8 +186,6 @@ BOOL CDECL X11DRV_DeleteDC( PHYSDEV dev )
*/
INT
CDECL
X11DRV_GetDeviceCaps
(
PHYSDEV
dev
,
INT
cap
)
{
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
switch
(
cap
)
{
case
DRIVERVERSION
:
...
...
@@ -262,7 +259,7 @@ INT CDECL X11DRV_GetDeviceCaps( PHYSDEV dev, INT cap )
case
LOGPIXELSY
:
return
log_pixels_y
;
case
CAPS1
:
FIXME
(
"(%p): CAPS1 is unimplemented, will return 0
\n
"
,
physD
ev
->
hdc
);
FIXME
(
"(%p): CAPS1 is unimplemented, will return 0
\n
"
,
d
ev
->
hdc
);
/* please see wingdi.h for the possible bit-flag values that need
to be returned. */
return
0
;
...
...
@@ -279,7 +276,7 @@ INT CDECL X11DRV_GetDeviceCaps( PHYSDEV dev, INT cap )
case
BLTALIGNMENT
:
return
0
;
default:
FIXME
(
"(%p): unsupported capability %d, will return 0
\n
"
,
physD
ev
->
hdc
,
cap
);
FIXME
(
"(%p): unsupported capability %d, will return 0
\n
"
,
d
ev
->
hdc
,
cap
);
return
0
;
}
}
...
...
@@ -352,7 +349,7 @@ INT CDECL X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_da
XSetSubwindowMode
(
gdi_display
,
physDev
->
gc
,
data
->
mode
);
wine_tsx11_unlock
();
TRACE
(
"SET_DRAWABLE hdc %p drawable %lx gl_drawable %lx pf %u dc_rect %s drawable_rect %s
\n
"
,
physD
ev
->
hdc
,
physDev
->
drawable
,
physDev
->
gl_drawable
,
physDev
->
current_pf
,
d
ev
->
hdc
,
physDev
->
drawable
,
physDev
->
gl_drawable
,
physDev
->
current_pf
,
wine_dbgstr_rect
(
&
physDev
->
dc_rect
),
wine_dbgstr_rect
(
&
physDev
->
drawable_rect
)
);
return
TRUE
;
}
...
...
@@ -389,7 +386,7 @@ INT CDECL X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_da
rect
.
top
=
event
.
xgraphicsexpose
.
y
-
physDev
->
dc_rect
.
top
;
rect
.
right
=
rect
.
left
+
event
.
xgraphicsexpose
.
width
;
rect
.
bottom
=
rect
.
top
+
event
.
xgraphicsexpose
.
height
;
if
(
GetLayout
(
physD
ev
->
hdc
)
&
LAYOUT_RTL
)
if
(
GetLayout
(
d
ev
->
hdc
)
&
LAYOUT_RTL
)
mirror_rect
(
&
physDev
->
dc_rect
,
&
rect
);
TRACE
(
"got %s count %d
\n
"
,
wine_dbgstr_rect
(
&
rect
),
...
...
dlls/winex11.drv/opengl.c
View file @
00647af5
...
...
@@ -658,7 +658,7 @@ static BOOL describeDrawable(X11DRV_PDEVICE *physDev) {
fmt
=
ConvertPixelFormatWGLtoGLX
(
gdi_display
,
physDev
->
current_pf
,
TRUE
/* Offscreen */
,
&
fmt_count
);
if
(
!
fmt
)
return
FALSE
;
TRACE
(
" HDC %p has:
\n
"
,
physDev
->
hdc
);
TRACE
(
" HDC %p has:
\n
"
,
physDev
->
dev
.
hdc
);
TRACE
(
" - iPixelFormat %d
\n
"
,
fmt
->
iPixelFormat
);
TRACE
(
" - Drawable %p
\n
"
,
(
void
*
)
get_glxdrawable
(
physDev
));
TRACE
(
" - FBCONFIG_ID 0x%x
\n
"
,
fmt
->
fmt_id
);
...
...
@@ -1648,7 +1648,7 @@ static BOOL internal_SetPixelFormat(X11DRV_PDEVICE *physDev,
pglXGetFBConfigAttrib
(
gdi_display
,
fmt
->
fbconfig
,
GLX_DRAWABLE_TYPE
,
&
value
);
wine_tsx11_unlock
();
hwnd
=
WindowFromDC
(
physDev
->
hdc
);
hwnd
=
WindowFromDC
(
physDev
->
dev
.
hdc
);
if
(
hwnd
)
{
if
(
!
(
value
&
GLX_WINDOW_BIT
))
{
WARN
(
"Pixel format %d is not compatible for window rendering
\n
"
,
iPixelFormat
);
...
...
@@ -1749,7 +1749,7 @@ HGLRC CDECL X11DRV_wglCreateContext(PHYSDEV dev)
WineGLPixelFormat
*
fmt
;
int
hdcPF
=
physDev
->
current_pf
;
int
fmt_count
=
0
;
HDC
hdc
=
physD
ev
->
hdc
;
HDC
hdc
=
d
ev
->
hdc
;
TRACE
(
"(%p)->(PF:%d)
\n
"
,
hdc
,
hdcPF
);
...
...
@@ -1886,7 +1886,7 @@ BOOL CDECL X11DRV_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc)
{
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
BOOL
ret
;
HDC
hdc
=
physD
ev
->
hdc
;
HDC
hdc
=
d
ev
->
hdc
;
DWORD
type
=
GetObjectType
(
hdc
);
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
hglrc
;
...
...
@@ -2004,8 +2004,8 @@ BOOL CDECL X11DRV_wglMakeContextCurrentARB( PHYSDEV draw_dev, PHYSDEV read_dev,
ctx
->
has_been_current
=
TRUE
;
ctx
->
tid
=
GetCurrentThreadId
();
ctx
->
hdc
=
pDrawD
ev
->
hdc
;
ctx
->
read_hdc
=
pReadD
ev
->
hdc
;
ctx
->
hdc
=
draw_d
ev
->
hdc
;
ctx
->
read_hdc
=
read_d
ev
->
hdc
;
ctx
->
drawables
[
0
]
=
d_draw
;
ctx
->
drawables
[
1
]
=
d_read
;
ctx
->
refresh_drawables
=
FALSE
;
...
...
@@ -2199,12 +2199,12 @@ BOOL CDECL X11DRV_wglUseFontBitmapsA(PHYSDEV dev, DWORD first, DWORD count, DWOR
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
Font
fid
=
physDev
->
font
;
TRACE
(
"(%p, %d, %d, %d) using font %ld
\n
"
,
physD
ev
->
hdc
,
first
,
count
,
listBase
,
fid
);
TRACE
(
"(%p, %d, %d, %d) using font %ld
\n
"
,
d
ev
->
hdc
,
first
,
count
,
listBase
,
fid
);
if
(
!
has_opengl
())
return
FALSE
;
if
(
fid
==
0
)
{
return
internal_wglUseFontBitmaps
(
physD
ev
->
hdc
,
first
,
count
,
listBase
,
GetGlyphOutlineA
);
return
internal_wglUseFontBitmaps
(
d
ev
->
hdc
,
first
,
count
,
listBase
,
GetGlyphOutlineA
);
}
wine_tsx11_lock
();
...
...
@@ -2224,12 +2224,12 @@ BOOL CDECL X11DRV_wglUseFontBitmapsW(PHYSDEV dev, DWORD first, DWORD count, DWOR
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
Font
fid
=
physDev
->
font
;
TRACE
(
"(%p, %d, %d, %d) using font %ld
\n
"
,
physD
ev
->
hdc
,
first
,
count
,
listBase
,
fid
);
TRACE
(
"(%p, %d, %d, %d) using font %ld
\n
"
,
d
ev
->
hdc
,
first
,
count
,
listBase
,
fid
);
if
(
!
has_opengl
())
return
FALSE
;
if
(
fid
==
0
)
{
return
internal_wglUseFontBitmaps
(
physD
ev
->
hdc
,
first
,
count
,
listBase
,
GetGlyphOutlineW
);
return
internal_wglUseFontBitmaps
(
d
ev
->
hdc
,
first
,
count
,
listBase
,
GetGlyphOutlineW
);
}
WARN
(
"Using the glX API for the WCHAR variant - some characters may come out incorrectly !
\n
"
);
...
...
@@ -2358,7 +2358,7 @@ HGLRC CDECL X11DRV_wglCreateContextAttribsARB(PHYSDEV dev, HGLRC hShareContext,
wine_tsx11_lock
();
ret
=
alloc_context
();
wine_tsx11_unlock
();
ret
->
hdc
=
physD
ev
->
hdc
;
ret
->
hdc
=
d
ev
->
hdc
;
ret
->
fmt
=
fmt
;
ret
->
vis
=
NULL
;
/* glXCreateContextAttribsARB requires a fbconfig instead of a visual */
ret
->
gl3_context
=
TRUE
;
...
...
@@ -2701,8 +2701,8 @@ HDC CDECL X11DRV_wglGetPbufferDCARB(PHYSDEV dev, HPBUFFERARB hPbuffer)
SetRect
(
&
physDev
->
drawable_rect
,
0
,
0
,
object
->
width
,
object
->
height
);
physDev
->
dc_rect
=
physDev
->
drawable_rect
;
TRACE
(
"(%p)->(%p)
\n
"
,
hPbuffer
,
physD
ev
->
hdc
);
return
physD
ev
->
hdc
;
TRACE
(
"(%p)->(%p)
\n
"
,
hPbuffer
,
d
ev
->
hdc
);
return
d
ev
->
hdc
;
}
/**
...
...
dlls/winex11.drv/palette.c
View file @
00647af5
...
...
@@ -880,7 +880,7 @@ static inline BOOL colour_is_brighter(RGBQUAD c1, RGBQUAD c2)
*/
COLORREF
X11DRV_PALETTE_GetColor
(
X11DRV_PDEVICE
*
physDev
,
COLORREF
color
)
{
HPALETTE
hPal
=
GetCurrentObject
(
physDev
->
hdc
,
OBJ_PAL
);
HPALETTE
hPal
=
GetCurrentObject
(
physDev
->
dev
.
hdc
,
OBJ_PAL
);
unsigned
char
spec_type
=
color
>>
24
;
unsigned
idx
=
color
&
0xffff
;
PALETTEENTRY
entry
;
...
...
@@ -901,7 +901,7 @@ COLORREF X11DRV_PALETTE_GetColor( X11DRV_PDEVICE *physDev, COLORREF color )
return
RGB
(
entry
.
peRed
,
entry
.
peGreen
,
entry
.
peBlue
);
case
0x10
:
/* DIBINDEX */
if
(
GetDIBColorTable
(
physDev
->
hdc
,
idx
,
1
,
&
quad
)
!=
1
)
{
if
(
GetDIBColorTable
(
physDev
->
dev
.
hdc
,
idx
,
1
,
&
quad
)
!=
1
)
{
WARN
(
"DIBINDEX(%x) : idx %d is out of bounds, assuming black
\n
"
,
color
,
idx
);
return
0
;
}
...
...
@@ -924,7 +924,7 @@ COLORREF X11DRV_PALETTE_GetColor( X11DRV_PDEVICE *physDev, COLORREF color )
int
X11DRV_PALETTE_ToPhysical
(
X11DRV_PDEVICE
*
physDev
,
COLORREF
color
)
{
WORD
index
=
0
;
HPALETTE
hPal
=
GetCurrentObject
(
physDev
->
hdc
,
OBJ_PAL
);
HPALETTE
hPal
=
GetCurrentObject
(
physDev
->
dev
.
hdc
,
OBJ_PAL
);
unsigned
char
spec_type
=
color
>>
24
;
int
*
mapping
=
palette_get_mapping
(
hPal
);
PALETTEENTRY
entry
;
...
...
@@ -968,7 +968,7 @@ int X11DRV_PALETTE_ToPhysical( X11DRV_PDEVICE *physDev, COLORREF color )
int
white
=
1
;
RGBQUAD
table
[
2
];
if
(
GetDIBColorTable
(
physDev
->
hdc
,
0
,
2
,
table
)
==
2
)
if
(
GetDIBColorTable
(
physDev
->
dev
.
hdc
,
0
,
2
,
table
)
==
2
)
{
if
(
!
colour_is_brighter
(
table
[
1
],
table
[
0
]))
white
=
0
;
}
...
...
@@ -1024,7 +1024,7 @@ int X11DRV_PALETTE_ToPhysical( X11DRV_PDEVICE *physDev, COLORREF color )
int
white
=
1
;
RGBQUAD
table
[
2
];
if
(
GetDIBColorTable
(
physDev
->
hdc
,
0
,
2
,
table
)
==
2
)
if
(
GetDIBColorTable
(
physDev
->
dev
.
hdc
,
0
,
2
,
table
)
==
2
)
{
if
(
!
colour_is_brighter
(
table
[
1
],
table
[
0
]))
white
=
0
;
...
...
@@ -1377,7 +1377,6 @@ UINT CDECL X11DRV_GetSystemPaletteEntries( PHYSDEV dev, UINT start, UINT count,
*/
COLORREF
CDECL
X11DRV_GetNearestColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
unsigned
char
spec_type
=
color
>>
24
;
COLORREF
nearest
;
...
...
@@ -1389,7 +1388,7 @@ COLORREF CDECL X11DRV_GetNearestColor( PHYSDEV dev, COLORREF color )
UINT
index
;
PALETTEENTRY
entry
;
HPALETTE
hpal
=
GetCurrentObject
(
physD
ev
->
hdc
,
OBJ_PAL
);
HPALETTE
hpal
=
GetCurrentObject
(
d
ev
->
hdc
,
OBJ_PAL
);
if
(
!
hpal
)
hpal
=
GetStockObject
(
DEFAULT_PALETTE
);
...
...
@@ -1420,10 +1419,9 @@ COLORREF CDECL X11DRV_GetNearestColor( PHYSDEV dev, COLORREF color )
*/
UINT
CDECL
X11DRV_RealizeDefaultPalette
(
PHYSDEV
dev
)
{
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
UINT
ret
=
0
;
if
(
palette_size
&&
GetObjectType
(
physD
ev
->
hdc
)
!=
OBJ_MEMDC
)
if
(
palette_size
&&
GetObjectType
(
d
ev
->
hdc
)
!=
OBJ_MEMDC
)
{
/* lookup is needed to account for SetSystemPaletteUse() stuff */
int
i
,
index
,
*
mapping
=
palette_get_mapping
(
GetStockObject
(
DEFAULT_PALETTE
)
);
...
...
dlls/winex11.drv/pen.c
View file @
00647af5
...
...
@@ -80,7 +80,7 @@ HPEN CDECL X11DRV_SelectPen( PHYSDEV dev, HPEN hpen )
if
(
physDev
->
pen
.
width
==
1
)
physDev
->
pen
.
width
=
0
;
/* Faster */
if
(
hpen
==
GetStockObject
(
DC_PEN
))
logpen
.
lopnColor
=
GetDCPenColor
(
physD
ev
->
hdc
);
logpen
.
lopnColor
=
GetDCPenColor
(
d
ev
->
hdc
);
physDev
->
pen
.
pixel
=
X11DRV_PALETTE_ToPhysical
(
physDev
,
logpen
.
lopnColor
);
switch
(
logpen
.
lopnStyle
&
PS_STYLE_MASK
)
{
...
...
@@ -131,7 +131,7 @@ COLORREF CDECL X11DRV_SetDCPenColor( PHYSDEV dev, COLORREF crColor )
{
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
if
(
GetCurrentObject
(
physD
ev
->
hdc
,
OBJ_PEN
)
==
GetStockObject
(
DC_PEN
))
if
(
GetCurrentObject
(
d
ev
->
hdc
,
OBJ_PEN
)
==
GetStockObject
(
DC_PEN
))
physDev
->
pen
.
pixel
=
X11DRV_PALETTE_ToPhysical
(
physDev
,
crColor
);
return
crColor
;
...
...
dlls/winex11.drv/text.c
View file @
00647af5
...
...
@@ -62,7 +62,7 @@ BOOL CDECL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
rotated
=
TRUE
;
TRACE
(
"hdc=%p df=%04x %d,%d rc %s %s, %d flags=%d lpDx=%p
\n
"
,
physD
ev
->
hdc
,
(
UINT16
)
physDev
->
font
,
x
,
y
,
wine_dbgstr_rect
(
lprect
),
d
ev
->
hdc
,
(
UINT16
)
physDev
->
font
,
x
,
y
,
wine_dbgstr_rect
(
lprect
),
debugstr_wn
(
wstr
,
count
),
count
,
flags
,
lpDx
);
/* Draw the rectangle */
...
...
dlls/winex11.drv/x11drv.h
View file @
00647af5
...
...
@@ -146,7 +146,6 @@ struct xrender_info;
typedef
struct
{
struct
gdi_physdev
dev
;
HDC
hdc
;
GC
gc
;
/* X Window GC */
Drawable
drawable
;
RECT
dc_rect
;
/* DC rectangle relative to drawable */
...
...
dlls/winex11.drv/xfont.c
View file @
00647af5
...
...
@@ -3232,7 +3232,7 @@ HFONT CDECL X11DRV_SelectFont( PHYSDEV dev, HFONT hfont, HANDLE gdiFont )
LOGFONTW
logfont
;
LOGFONT16
lf
;
TRACE
(
"hdc=%p, hfont=%p
\n
"
,
physD
ev
->
hdc
,
hfont
);
TRACE
(
"hdc=%p, hfont=%p
\n
"
,
d
ev
->
hdc
,
hfont
);
if
(
!
GetObjectW
(
hfont
,
sizeof
(
logfont
),
&
logfont
))
return
HGDI_ERROR
;
...
...
@@ -3275,7 +3275,7 @@ HFONT CDECL X11DRV_SelectFont( PHYSDEV dev, HFONT hfont, HANDLE gdiFont )
}
if
(
!
lf
.
lfHeight
)
lf
.
lfHeight
=
-
(
DEF_POINT_SIZE
*
GetDeviceCaps
(
physD
ev
->
hdc
,
LOGPIXELSY
)
+
(
72
>>
1
))
/
72
;
lf
.
lfHeight
=
-
(
DEF_POINT_SIZE
*
GetDeviceCaps
(
d
ev
->
hdc
,
LOGPIXELSY
)
+
(
72
>>
1
))
/
72
;
{
/* Fixup aliases before passing to RealizeFont */
...
...
dlls/winex11.drv/xrender.c
View file @
00647af5
...
...
@@ -577,7 +577,7 @@ static Picture get_xrender_picture(X11DRV_PDEVICE *physDev)
physDev
->
dc_rect
.
left
,
physDev
->
dc_rect
.
top
,
(
XRectangle
*
)
clip
->
Buffer
,
clip
->
rdh
.
nCount
);
wine_tsx11_unlock
();
TRACE
(
"Allocing pict=%lx dc=%p drawable=%08lx
\n
"
,
info
->
pict
,
physDev
->
hdc
,
physDev
->
drawable
);
TRACE
(
"Allocing pict=%lx dc=%p drawable=%08lx
\n
"
,
info
->
pict
,
physDev
->
dev
.
hdc
,
physDev
->
drawable
);
HeapFree
(
GetProcessHeap
(),
0
,
clip
);
}
...
...
@@ -601,7 +601,7 @@ static Picture get_xrender_picture_source(X11DRV_PDEVICE *physDev, BOOL repeat)
wine_tsx11_unlock
();
TRACE
(
"Allocing pict_src=%lx dc=%p drawable=%08lx repeat=%u
\n
"
,
info
->
pict_src
,
physDev
->
hdc
,
physDev
->
drawable
,
pa
.
repeat
);
info
->
pict_src
,
physDev
->
dev
.
hdc
,
physDev
->
drawable
,
pa
.
repeat
);
}
return
info
->
pict_src
;
...
...
@@ -792,14 +792,14 @@ static BOOL get_gasp_flags(X11DRV_PDEVICE *physDev, WORD *flags)
*
flags
=
0
;
size
=
GetFontData
(
physDev
->
hdc
,
MS_GASP_TAG
,
0
,
NULL
,
0
);
size
=
GetFontData
(
physDev
->
dev
.
hdc
,
MS_GASP_TAG
,
0
,
NULL
,
0
);
if
(
size
==
GDI_ERROR
)
return
FALSE
;
gasp
=
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
GetFontData
(
physDev
->
hdc
,
MS_GASP_TAG
,
0
,
gasp
,
size
);
GetFontData
(
physDev
->
dev
.
hdc
,
MS_GASP_TAG
,
0
,
gasp
,
size
);
GetTextMetricsW
(
physDev
->
hdc
,
&
tm
);
GetTextMetricsW
(
physDev
->
dev
.
hdc
,
&
tm
);
ppem
=
abs
(
X11DRV_YWStoDS
(
physDev
,
tm
.
tmAscent
+
tm
.
tmDescent
-
tm
.
tmInternalLeading
));
gasp
++
;
...
...
@@ -1062,7 +1062,7 @@ BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE *physDev, HFONT hfont)
lfsz
.
devsize
.
cx
=
X11DRV_XWStoDS
(
physDev
,
lfsz
.
lf
.
lfWidth
);
lfsz
.
devsize
.
cy
=
X11DRV_YWStoDS
(
physDev
,
lfsz
.
lf
.
lfHeight
);
GetTransform
(
physDev
->
hdc
,
0x204
,
&
lfsz
.
xform
);
GetTransform
(
physDev
->
dev
.
hdc
,
0x204
,
&
lfsz
.
xform
);
TRACE
(
"font transform %f %f %f %f
\n
"
,
lfsz
.
xform
.
eM11
,
lfsz
.
xform
.
eM12
,
lfsz
.
xform
.
eM21
,
lfsz
.
xform
.
eM22
);
...
...
@@ -1202,13 +1202,13 @@ void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE *physDev)
XFlush
(
gdi_display
);
if
(
info
->
pict
)
{
TRACE
(
"freeing pict = %lx dc = %p
\n
"
,
info
->
pict
,
physDev
->
hdc
);
TRACE
(
"freeing pict = %lx dc = %p
\n
"
,
info
->
pict
,
physDev
->
dev
.
hdc
);
pXRenderFreePicture
(
gdi_display
,
info
->
pict
);
info
->
pict
=
0
;
}
if
(
info
->
pict_src
)
{
TRACE
(
"freeing pict = %lx dc = %p
\n
"
,
info
->
pict_src
,
physDev
->
hdc
);
TRACE
(
"freeing pict = %lx dc = %p
\n
"
,
info
->
pict_src
,
physDev
->
dev
.
hdc
);
pXRenderFreePicture
(
gdi_display
,
info
->
pict_src
);
info
->
pict_src
=
0
;
}
...
...
@@ -1261,20 +1261,20 @@ static void UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format)
break
;
}
buflen
=
GetGlyphOutlineW
(
physDev
->
hdc
,
glyph
,
ggo_format
,
&
gm
,
0
,
NULL
,
&
identity
);
buflen
=
GetGlyphOutlineW
(
physDev
->
dev
.
hdc
,
glyph
,
ggo_format
,
&
gm
,
0
,
NULL
,
&
identity
);
if
(
buflen
==
GDI_ERROR
)
{
if
(
format
!=
AA_None
)
{
format
=
AA_None
;
entry
->
aa_default
=
AA_None
;
ggo_format
=
GGO_GLYPH_INDEX
|
GGO_BITMAP
;
buflen
=
GetGlyphOutlineW
(
physDev
->
hdc
,
glyph
,
ggo_format
,
&
gm
,
0
,
NULL
,
&
identity
);
buflen
=
GetGlyphOutlineW
(
physDev
->
dev
.
hdc
,
glyph
,
ggo_format
,
&
gm
,
0
,
NULL
,
&
identity
);
}
if
(
buflen
==
GDI_ERROR
)
{
WARN
(
"GetGlyphOutlineW failed using default glyph
\n
"
);
buflen
=
GetGlyphOutlineW
(
physDev
->
hdc
,
0
,
ggo_format
,
&
gm
,
0
,
NULL
,
&
identity
);
buflen
=
GetGlyphOutlineW
(
physDev
->
dev
.
hdc
,
0
,
ggo_format
,
&
gm
,
0
,
NULL
,
&
identity
);
if
(
buflen
==
GDI_ERROR
)
{
WARN
(
"GetGlyphOutlineW failed for default glyph trying for space
\n
"
);
buflen
=
GetGlyphOutlineW
(
physDev
->
hdc
,
0x20
,
ggo_format
,
&
gm
,
0
,
NULL
,
&
identity
);
buflen
=
GetGlyphOutlineW
(
physDev
->
dev
.
hdc
,
0x20
,
ggo_format
,
&
gm
,
0
,
NULL
,
&
identity
);
if
(
buflen
==
GDI_ERROR
)
{
ERR
(
"GetGlyphOutlineW for all attempts unable to upload a glyph
\n
"
);
return
;
...
...
@@ -1356,7 +1356,7 @@ static void UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format)
buf
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
buflen
);
GetGlyphOutlineW
(
physDev
->
hdc
,
glyph
,
ggo_format
,
&
gm
,
buflen
,
buf
,
&
identity
);
GetGlyphOutlineW
(
physDev
->
dev
.
hdc
,
glyph
,
ggo_format
,
&
gm
,
buflen
,
buf
,
&
identity
);
formatEntry
->
realized
[
glyph
]
=
TRUE
;
TRACE
(
"buflen = %d. Got metrics: %dx%d adv=%d,%d origin=%d,%d
\n
"
,
...
...
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