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
97a9db43
Commit
97a9db43
authored
Aug 28, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Pass the brush origin explicitly to the brush backend functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b491635f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
12 deletions
+15
-12
bitblt.c
dlls/gdi32/dibdrv/bitblt.c
+6
-4
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+1
-1
graphics.c
dlls/gdi32/dibdrv/graphics.c
+4
-2
objects.c
dlls/gdi32/dibdrv/objects.c
+4
-5
No files found.
dlls/gdi32/dibdrv/bitblt.c
View file @
97a9db43
...
...
@@ -737,7 +737,8 @@ static DWORD create_tmp_dib( const dib_info *copy, int width, int height, dib_in
}
static
DWORD
execute_rop
(
dibdrv_physdev
*
pdev
,
const
RECT
*
dst_rect
,
dib_info
*
src
,
const
RECT
*
src_rect
,
const
struct
clipped_rects
*
clipped_rects
,
DWORD
rop
)
const
RECT
*
src_rect
,
const
struct
clipped_rects
*
clipped_rects
,
const
POINT
*
brush_org
,
DWORD
rop
)
{
dib_info
*
dibs
[
3
],
*
result
=
src
,
tmp
;
RECT
rects
[
3
];
...
...
@@ -784,10 +785,10 @@ static DWORD execute_rop( dibdrv_physdev *pdev, const RECT *dst_rect, dib_info *
break
;
case
OP_ARGS
(
PAT
,
DST
):
pdev
->
brush
.
rects
(
pdev
,
&
pdev
->
brush
,
dibs
[
DST
],
clipped_rects
->
count
,
clipped_rects
->
rects
,
OP_ROP
(
*
opcode
)
);
brush_org
,
OP_ROP
(
*
opcode
)
);
break
;
case
OP_ARGS
(
PAT
,
SRC
):
pdev
->
brush
.
rects
(
pdev
,
&
pdev
->
brush
,
dibs
[
SRC
],
1
,
&
rects
[
SRC
],
OP_ROP
(
*
opcode
)
);
pdev
->
brush
.
rects
(
pdev
,
&
pdev
->
brush
,
dibs
[
SRC
],
1
,
&
rects
[
SRC
],
brush_org
,
OP_ROP
(
*
opcode
)
);
break
;
}
}
...
...
@@ -1026,7 +1027,8 @@ DWORD dibdrv_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info,
mask_rect
(
&
pdev
->
dib
,
&
dst
->
visrect
,
&
src_dib
,
&
src
->
visrect
,
&
clipped_rects
,
rop2
);
}
else
ret
=
execute_rop
(
pdev
,
&
dst
->
visrect
,
&
src_dib
,
&
src
->
visrect
,
&
clipped_rects
,
rop
);
ret
=
execute_rop
(
pdev
,
&
dst
->
visrect
,
&
src_dib
,
&
src
->
visrect
,
&
clipped_rects
,
&
dc
->
brush_org
,
rop
);
free_clipped_rects
(
&
clipped_rects
);
}
if
(
tmp_rgn
)
DeleteObject
(
tmp_rgn
);
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
97a9db43
...
...
@@ -75,7 +75,7 @@ typedef struct dib_brush
rop_mask_bits
masks
;
struct
brush_pattern
pattern
;
BOOL
(
*
rects
)(
struct
dibdrv_physdev
*
pdev
,
struct
dib_brush
*
brush
,
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
INT
rop
);
int
num
,
const
RECT
*
rects
,
const
POINT
*
brush_org
,
INT
rop
);
}
dib_brush
;
struct
intensity_range
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
97a9db43
...
...
@@ -74,7 +74,7 @@ static BOOL brush_rect( dibdrv_physdev *pdev, dib_brush *brush, const RECT *rect
if
(
!
get_clipped_rects
(
&
pdev
->
dib
,
rect
,
clip
,
&
clipped_rects
))
return
TRUE
;
ret
=
brush
->
rects
(
pdev
,
brush
,
&
pdev
->
dib
,
clipped_rects
.
count
,
clipped_rects
.
rects
,
dc
->
ROPmode
);
&
dc
->
brush_org
,
dc
->
ROPmode
);
free_clipped_rects
(
&
clipped_rects
);
return
ret
;
}
...
...
@@ -1174,6 +1174,7 @@ BOOL dibdrv_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
dib_brush
*
brush
=
&
pdev
->
brush
;
DC
*
dc
=
get_physdev_dc
(
dev
);
int
rop2
=
get_rop2_from_rop
(
rop
);
struct
clipped_rects
clipped_rects
;
DWORD
and
=
0
,
xor
=
0
;
...
...
@@ -1196,7 +1197,8 @@ BOOL dibdrv_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
case
R2_NOP
:
break
;
default:
ret
=
brush
->
rects
(
pdev
,
brush
,
&
pdev
->
dib
,
clipped_rects
.
count
,
clipped_rects
.
rects
,
rop2
);
ret
=
brush
->
rects
(
pdev
,
brush
,
&
pdev
->
dib
,
clipped_rects
.
count
,
clipped_rects
.
rects
,
&
dc
->
brush_org
,
rop2
);
break
;
}
free_clipped_rects
(
&
clipped_rects
);
...
...
dlls/gdi32/dibdrv/objects.c
View file @
97a9db43
...
...
@@ -1773,7 +1773,7 @@ BOOL fill_with_pixel( DC *dc, dib_info *dib, DWORD pixel, int num, const RECT *r
* Fill a number of rectangles with the solid brush
*/
static
BOOL
solid_brush
(
dibdrv_physdev
*
pdev
,
dib_brush
*
brush
,
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
INT
rop
)
int
num
,
const
RECT
*
rects
,
const
POINT
*
brush_org
,
INT
rop
)
{
DC
*
dc
=
get_physdev_dc
(
&
pdev
->
dev
);
DWORD
color
=
get_pixel_color
(
dc
,
&
pdev
->
dib
,
brush
->
colorref
,
TRUE
);
...
...
@@ -2005,9 +2005,8 @@ static BOOL select_pattern_brush( dibdrv_physdev *pdev, dib_brush *brush, BOOL *
* FIXME: Should we insist l < r && t < b? Currently we assume this.
*/
static
BOOL
pattern_brush
(
dibdrv_physdev
*
pdev
,
dib_brush
*
brush
,
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
INT
rop
)
int
num
,
const
RECT
*
rects
,
const
POINT
*
brush_org
,
INT
rop
)
{
DC
*
dc
=
get_physdev_dc
(
&
pdev
->
dev
);
BOOL
needs_reselect
=
FALSE
;
if
(
rop
!=
brush
->
rop
)
...
...
@@ -2043,14 +2042,14 @@ static BOOL pattern_brush(dibdrv_physdev *pdev, dib_brush *brush, dib_info *dib,
}
}
dib
->
funcs
->
pattern_rects
(
dib
,
num
,
rects
,
&
dc
->
brush_org
,
&
brush
->
dib
,
&
brush
->
masks
);
dib
->
funcs
->
pattern_rects
(
dib
,
num
,
rects
,
brush_org
,
&
brush
->
dib
,
&
brush
->
masks
);
if
(
needs_reselect
)
free_pattern_brush
(
brush
);
return
TRUE
;
}
static
BOOL
null_brush
(
dibdrv_physdev
*
pdev
,
dib_brush
*
brush
,
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
INT
rop
)
int
num
,
const
RECT
*
rects
,
const
POINT
*
brush_org
,
INT
rop
)
{
return
TRUE
;
}
...
...
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