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
1ac1d7c6
Commit
1ac1d7c6
authored
Jul 11, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Pass the dest visible rectangle to the PatBlt driver entry point.
parent
8bd130b9
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
61 additions
and
70 deletions
+61
-70
bitblt.c
dlls/gdi32/bitblt.c
+23
-5
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+1
-1
graphics.c
dlls/gdi32/dibdrv/graphics.c
+5
-6
driver.c
dlls/gdi32/driver.c
+1
-1
bitblt.c
dlls/gdi32/enhmfdrv/bitblt.c
+9
-10
enhmetafiledrv.h
dlls/gdi32/enhmfdrv/enhmetafiledrv.h
+1
-2
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-1
bitblt.c
dlls/gdi32/mfdrv/bitblt.c
+3
-2
metafiledrv.h
dlls/gdi32/mfdrv/metafiledrv.h
+1
-2
bitblt.c
dlls/wineps.drv/bitblt.c
+8
-12
wineps.drv.spec
dlls/wineps.drv/wineps.drv.spec
+1
-1
bitblt.c
dlls/winex11.drv/bitblt.c
+6
-26
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+1
-1
No files found.
dlls/gdi32/bitblt.c
View file @
1ac1d7c6
...
...
@@ -214,19 +214,37 @@ BOOL CDECL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
BOOL
WINAPI
PatBlt
(
HDC
hdc
,
INT
left
,
INT
top
,
INT
width
,
INT
height
,
DWORD
rop
)
{
DC
*
dc
;
BOOL
bRet
=
FALSE
;
TRACE
(
"%p %d,%d %dx%d %06x
\n
"
,
hdc
,
left
,
top
,
width
,
height
,
rop
);
BOOL
ret
=
FALSE
;
if
(
rop_uses_src
(
rop
))
return
FALSE
;
if
((
dc
=
get_dc_ptr
(
hdc
)))
{
struct
bitblt_coords
dst
;
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pPatBlt
);
update_dc
(
dc
);
bRet
=
physdev
->
funcs
->
pPatBlt
(
physdev
,
left
,
top
,
width
,
height
,
rop
);
dst
.
log_x
=
left
;
dst
.
log_y
=
top
;
dst
.
log_width
=
width
;
dst
.
log_height
=
height
;
dst
.
layout
=
dc
->
layout
;
if
(
rop
&
NOMIRRORBITMAP
)
{
dst
.
layout
|=
LAYOUT_BITMAPORIENTATIONPRESERVED
;
rop
&=
~
NOMIRRORBITMAP
;
}
get_vis_rectangles
(
dc
,
&
dst
,
NULL
,
NULL
);
TRACE
(
"dst %p log=%d,%d %dx%d phys=%d,%d %dx%d vis=%s rop=%06x
\n
"
,
hdc
,
dst
.
log_x
,
dst
.
log_y
,
dst
.
log_width
,
dst
.
log_height
,
dst
.
x
,
dst
.
y
,
dst
.
width
,
dst
.
height
,
wine_dbgstr_rect
(
&
dst
.
visrect
),
rop
);
ret
=
physdev
->
funcs
->
pPatBlt
(
physdev
,
&
dst
,
rop
);
release_dc_ptr
(
dc
);
}
return
bR
et
;
return
r
et
;
}
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
1ac1d7c6
...
...
@@ -19,7 +19,7 @@
*/
extern
BOOL
CDECL
dibdrv_LineTo
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
dibdrv_PatBlt
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
INT
width
,
INT
heigh
t
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
dibdrv_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
ds
t
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
dibdrv_PaintRgn
(
PHYSDEV
dev
,
HRGN
hrgn
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
dibdrv_Rectangle
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
DECLSPEC_HIDDEN
;
extern
HBRUSH
CDECL
dibdrv_SelectBrush
(
PHYSDEV
dev
,
HBRUSH
hbrush
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
1ac1d7c6
...
...
@@ -93,27 +93,26 @@ static inline INT get_rop2_from_rop(INT rop)
/***********************************************************************
* dibdrv_PatBlt
*/
BOOL
CDECL
dibdrv_PatBlt
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
INT
width
,
INT
heigh
t
,
DWORD
rop
)
BOOL
CDECL
dibdrv_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
ds
t
,
DWORD
rop
)
{
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pPatBlt
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
INT
rop2
=
get_rop2_from_rop
(
rop
);
RECT
rect
=
get_device_rect
(
dev
->
hdc
,
x
,
y
,
x
+
width
,
y
+
height
,
TRUE
);
BOOL
done
;
TRACE
(
"(%p, %d, %d, %d, %d, %06x)
\n
"
,
dev
,
x
,
y
,
width
,
height
,
rop
);
TRACE
(
"(%p, %d, %d, %d, %d, %06x)
\n
"
,
dev
,
dst
->
x
,
dst
->
y
,
dst
->
width
,
dst
->
height
,
rop
);
if
(
defer_brush
(
pdev
))
return
next
->
funcs
->
pPatBlt
(
next
,
x
,
y
,
width
,
heigh
t
,
rop
);
return
next
->
funcs
->
pPatBlt
(
next
,
ds
t
,
rop
);
update_brush_rop
(
pdev
,
rop2
);
done
=
pdev
->
brush_rects
(
pdev
,
1
,
&
rect
);
done
=
pdev
->
brush_rects
(
pdev
,
1
,
&
dst
->
vis
rect
);
update_brush_rop
(
pdev
,
GetROP2
(
dev
->
hdc
)
);
if
(
!
done
)
return
next
->
funcs
->
pPatBlt
(
next
,
x
,
y
,
width
,
heigh
t
,
rop
);
return
next
->
funcs
->
pPatBlt
(
next
,
ds
t
,
rop
);
return
TRUE
;
}
...
...
dlls/gdi32/driver.c
View file @
1ac1d7c6
...
...
@@ -521,7 +521,7 @@ static BOOL CDECL nulldrv_PaintRgn( PHYSDEV dev, HRGN rgn )
return
TRUE
;
}
static
BOOL
CDECL
nulldrv_PatBlt
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
INT
width
,
INT
heigh
t
,
DWORD
rop
)
static
BOOL
CDECL
nulldrv_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
ds
t
,
DWORD
rop
)
{
return
TRUE
;
}
...
...
dlls/gdi32/enhmfdrv/bitblt.c
View file @
1ac1d7c6
...
...
@@ -27,22 +27,21 @@
#include "enhmetafiledrv.h"
#include "wine/debug.h"
BOOL
CDECL
EMFDRV_PatBlt
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
width
,
INT
height
,
DWORD
rop
)
BOOL
CDECL
EMFDRV_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
dst
,
DWORD
rop
)
{
EMRBITBLT
emr
;
BOOL
ret
;
emr
.
emr
.
iType
=
EMR_BITBLT
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
rclBounds
.
left
=
left
;
emr
.
rclBounds
.
top
=
top
;
emr
.
rclBounds
.
right
=
left
+
width
-
1
;
emr
.
rclBounds
.
bottom
=
top
+
height
-
1
;
emr
.
xDest
=
left
;
emr
.
yDest
=
top
;
emr
.
cxDest
=
width
;
emr
.
cyDest
=
height
;
emr
.
rclBounds
.
left
=
dst
->
log_x
;
emr
.
rclBounds
.
top
=
dst
->
log_y
;
emr
.
rclBounds
.
right
=
dst
->
log_x
+
dst
->
log_
width
-
1
;
emr
.
rclBounds
.
bottom
=
dst
->
log_y
+
dst
->
log_
height
-
1
;
emr
.
xDest
=
dst
->
log_x
;
emr
.
yDest
=
dst
->
log_y
;
emr
.
cxDest
=
dst
->
log_
width
;
emr
.
cyDest
=
dst
->
log_
height
;
emr
.
dwRop
=
rop
;
emr
.
xSrc
=
0
;
emr
.
ySrc
=
0
;
...
...
dlls/gdi32/enhmfdrv/enhmetafiledrv.h
View file @
1ac1d7c6
...
...
@@ -98,8 +98,7 @@ extern INT CDECL EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y ) DECLSPEC
extern
BOOL
CDECL
EMFDRV_OffsetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_OffsetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_PaintRgn
(
PHYSDEV
dev
,
HRGN
hrgn
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_PatBlt
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
width
,
INT
height
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
dst
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
EMFDRV_Pie
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/gdi_private.h
View file @
1ac1d7c6
...
...
@@ -206,7 +206,7 @@ typedef struct gdi_dc_funcs
BOOL
(
CDECL
*
pOffsetViewportOrgEx
)(
PHYSDEV
,
INT
,
INT
,
POINT
*
);
BOOL
(
CDECL
*
pOffsetWindowOrgEx
)(
PHYSDEV
,
INT
,
INT
,
POINT
*
);
BOOL
(
CDECL
*
pPaintRgn
)(
PHYSDEV
,
HRGN
);
BOOL
(
CDECL
*
pPatBlt
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
DWORD
);
BOOL
(
CDECL
*
pPatBlt
)(
PHYSDEV
,
struct
bitblt_coords
*
,
DWORD
);
BOOL
(
CDECL
*
pPie
)(
PHYSDEV
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
,
INT
);
BOOL
(
CDECL
*
pPolyBezier
)(
PHYSDEV
,
const
POINT
*
,
DWORD
);
BOOL
(
CDECL
*
pPolyBezierTo
)(
PHYSDEV
,
const
POINT
*
,
DWORD
);
...
...
dlls/gdi32/mfdrv/bitblt.c
View file @
1ac1d7c6
...
...
@@ -28,9 +28,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(metafile);
/***********************************************************************
* MFDRV_PatBlt
*/
BOOL
CDECL
MFDRV_PatBlt
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
width
,
INT
heigh
t
,
DWORD
rop
)
BOOL
CDECL
MFDRV_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
ds
t
,
DWORD
rop
)
{
MFDRV_MetaParam6
(
dev
,
META_PATBLT
,
left
,
top
,
width
,
height
,
HIWORD
(
rop
),
LOWORD
(
rop
)
);
MFDRV_MetaParam6
(
dev
,
META_PATBLT
,
dst
->
log_x
,
dst
->
log_y
,
dst
->
log_width
,
dst
->
log_height
,
HIWORD
(
rop
),
LOWORD
(
rop
)
);
return
TRUE
;
}
...
...
dlls/gdi32/mfdrv/metafiledrv.h
View file @
1ac1d7c6
...
...
@@ -91,8 +91,7 @@ extern INT CDECL MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y ) DECLSPEC_HID
extern
BOOL
CDECL
MFDRV_OffsetViewportOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_OffsetWindowOrgEx
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
POINT
*
pt
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_PaintRgn
(
PHYSDEV
dev
,
HRGN
hrgn
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_PatBlt
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
width
,
INT
height
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
dst
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
MFDRV_Pie
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
DECLSPEC_HIDDEN
;
...
...
dlls/wineps.drv/bitblt.c
View file @
1ac1d7c6
...
...
@@ -28,21 +28,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
*
* PSDRV_PatBlt
*/
BOOL
CDECL
PSDRV_PatBlt
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
INT
width
,
INT
heigh
t
,
DWORD
dwRop
)
BOOL
CDECL
PSDRV_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
ds
t
,
DWORD
dwRop
)
{
POINT
pt
[
2
];
pt
[
0
].
x
=
x
;
pt
[
0
].
y
=
y
;
pt
[
1
].
x
=
x
+
width
;
pt
[
1
].
y
=
y
+
height
;
LPtoDP
(
dev
->
hdc
,
pt
,
2
);
switch
(
dwRop
)
{
case
PATCOPY
:
PSDRV_SetClip
(
dev
);
PSDRV_WriteGSave
(
dev
);
PSDRV_WriteRectangle
(
dev
,
pt
[
0
].
x
,
pt
[
0
].
y
,
pt
[
1
].
x
-
pt
[
0
].
x
,
pt
[
1
].
y
-
pt
[
0
].
y
);
PSDRV_WriteRectangle
(
dev
,
dst
->
visrect
.
left
,
dst
->
visrect
.
top
,
dst
->
visrect
.
right
-
dst
->
visrect
.
left
,
dst
->
visrect
.
bottom
-
dst
->
visrect
.
top
);
PSDRV_Brush
(
dev
,
FALSE
);
PSDRV_WriteGRestore
(
dev
);
PSDRV_ResetClip
(
dev
);
...
...
@@ -55,7 +49,9 @@ BOOL CDECL PSDRV_PatBlt(PHYSDEV dev, INT x, INT y, INT width, INT height, DWORD
PSDRV_SetClip
(
dev
);
PSDRV_WriteGSave
(
dev
);
PSDRV_WriteRectangle
(
dev
,
pt
[
0
].
x
,
pt
[
0
].
y
,
pt
[
1
].
x
-
pt
[
0
].
x
,
pt
[
1
].
y
-
pt
[
0
].
y
);
PSDRV_WriteRectangle
(
dev
,
dst
->
visrect
.
left
,
dst
->
visrect
.
top
,
dst
->
visrect
.
right
-
dst
->
visrect
.
left
,
dst
->
visrect
.
bottom
-
dst
->
visrect
.
top
);
PSDRV_CreateColor
(
dev
,
&
pscol
,
(
dwRop
==
BLACKNESS
)
?
RGB
(
0
,
0
,
0
)
:
RGB
(
0xff
,
0xff
,
0xff
)
);
PSDRV_WriteSetColor
(
dev
,
&
pscol
);
PSDRV_WriteFill
(
dev
);
...
...
@@ -64,7 +60,7 @@ BOOL CDECL PSDRV_PatBlt(PHYSDEV dev, INT x, INT y, INT width, INT height, DWORD
return
TRUE
;
}
default:
FIXME
(
"Unsupported rop %
d
\n
"
,
dwRop
);
FIXME
(
"Unsupported rop %
06x
\n
"
,
dwRop
);
return
FALSE
;
}
}
dlls/wineps.drv/wineps.drv.spec
View file @
1ac1d7c6
...
...
@@ -18,7 +18,7 @@
@ cdecl GetTextMetrics(ptr ptr) PSDRV_GetTextMetrics
@ cdecl LineTo(ptr long long) PSDRV_LineTo
@ cdecl PaintRgn(ptr long) PSDRV_PaintRgn
@ cdecl PatBlt(ptr
long long long long
long) PSDRV_PatBlt
@ cdecl PatBlt(ptr
ptr
long) PSDRV_PatBlt
@ cdecl Pie(ptr long long long long long long long long) PSDRV_Pie
@ cdecl PolyPolygon(ptr ptr ptr long) PSDRV_PolyPolygon
@ cdecl PolyPolyline(ptr ptr ptr long) PSDRV_PolyPolyline
...
...
dlls/winex11.drv/bitblt.c
View file @
1ac1d7c6
...
...
@@ -1408,35 +1408,15 @@ static BOOL same_format(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst)
/***********************************************************************
* X11DRV_PatBlt
*/
BOOL
CDECL
X11DRV_PatBlt
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
INT
width
,
INT
heigh
t
,
DWORD
rop
)
BOOL
CDECL
X11DRV_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
ds
t
,
DWORD
rop
)
{
X11DRV_PDEVICE
*
physDev
=
get_x11drv_dev
(
dev
);
BOOL
usePat
=
(((
rop
>>
4
)
&
0x0f0000
)
!=
(
rop
&
0x0f0000
));
const
BYTE
*
opcode
=
BITBLT_Opcodes
[(
rop
>>
16
)
&
0xff
];
struct
bitblt_coords
dst
;
dst
.
x
=
x
;
dst
.
y
=
y
;
dst
.
width
=
width
;
dst
.
height
=
height
;
dst
.
layout
=
GetLayout
(
dev
->
hdc
);
if
(
rop
&
NOMIRRORBITMAP
)
{
dst
.
layout
|=
LAYOUT_BITMAPORIENTATIONPRESERVED
;
rop
&=
~
NOMIRRORBITMAP
;
}
if
(
!
BITBLT_GetVisRectangles
(
physDev
,
NULL
,
&
dst
,
NULL
))
return
TRUE
;
if
(
IsRectEmpty
(
&
dst
->
visrect
))
return
TRUE
;
if
(
usePat
&&
!
X11DRV_SetupGCForBrush
(
physDev
))
return
TRUE
;
TRACE
(
"rect=%d,%d %dx%d org=%d,%d vis=%s
\n
"
,
dst
.
x
,
dst
.
y
,
dst
.
width
,
dst
.
height
,
physDev
->
dc_rect
.
left
,
physDev
->
dc_rect
.
top
,
wine_dbgstr_rect
(
&
dst
.
visrect
)
);
width
=
dst
.
visrect
.
right
-
dst
.
visrect
.
left
;
height
=
dst
.
visrect
.
bottom
-
dst
.
visrect
.
top
;
X11DRV_LockDIBSection
(
physDev
,
DIB_Status_GdiMod
);
wine_tsx11_lock
();
...
...
@@ -1472,10 +1452,10 @@ BOOL CDECL X11DRV_PatBlt( PHYSDEV dev, INT x, INT y, INT width, INT height, DWOR
break
;
}
XFillRectangle
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
physDev
->
dc_rect
.
left
+
dst
.
visrect
.
left
,
physDev
->
dc_rect
.
top
+
dst
.
visrect
.
top
,
dst
.
visrect
.
right
-
dst
.
visrect
.
left
,
dst
.
visrect
.
bottom
-
dst
.
visrect
.
top
);
physDev
->
dc_rect
.
left
+
dst
->
visrect
.
left
,
physDev
->
dc_rect
.
top
+
dst
->
visrect
.
top
,
dst
->
visrect
.
right
-
dst
->
visrect
.
left
,
dst
->
visrect
.
bottom
-
dst
->
visrect
.
top
);
wine_tsx11_unlock
();
X11DRV_UnlockDIBSection
(
physDev
,
TRUE
);
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
1ac1d7c6
...
...
@@ -30,7 +30,7 @@
@ cdecl GetTextMetrics(ptr ptr) X11DRV_GetTextMetrics
@ cdecl LineTo(ptr long long) X11DRV_LineTo
@ cdecl PaintRgn(ptr long) X11DRV_PaintRgn
@ cdecl PatBlt(ptr
long long long long
long) X11DRV_PatBlt
@ cdecl PatBlt(ptr
ptr
long) X11DRV_PatBlt
@ cdecl Pie(ptr long long long long long long long long) X11DRV_Pie
@ cdecl PolyPolygon(ptr ptr ptr long) X11DRV_PolyPolygon
@ cdecl PolyPolyline(ptr ptr ptr long) X11DRV_PolyPolyline
...
...
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