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
4e032474
Commit
4e032474
authored
Dec 30, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Define a structure to make the brush state independent from the physdev.
parent
cc9836bd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
20 deletions
+27
-20
bitblt.c
dlls/gdi32/dibdrv/bitblt.c
+2
-2
dc.c
dlls/gdi32/dibdrv/dc.c
+3
-3
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+19
-12
graphics.c
dlls/gdi32/dibdrv/graphics.c
+3
-3
objects.c
dlls/gdi32/dibdrv/objects.c
+0
-0
No files found.
dlls/gdi32/dibdrv/bitblt.c
View file @
4e032474
...
...
@@ -761,11 +761,11 @@ static DWORD execute_rop( dibdrv_physdev *pdev, const RECT *dst_rect, dib_info *
OP_DST
(
*
opcode
)
==
DST
?
clipped_rects
:
NULL
,
OP_ROP
(
*
opcode
)
);
break
;
case
OP_ARGS
(
PAT
,
DST
):
pdev
->
brush
_rects
(
pdev
,
dibs
[
DST
],
clipped_rects
->
count
,
clipped_rects
->
rects
,
pdev
->
brush
.
rects
(
pdev
,
&
pdev
->
brush
,
dibs
[
DST
],
clipped_rects
->
count
,
clipped_rects
->
rects
,
OP_ROP
(
*
opcode
)
);
break
;
case
OP_ARGS
(
PAT
,
SRC
):
pdev
->
brush
_rects
(
pdev
,
dibs
[
SRC
],
1
,
&
rects
[
SRC
],
OP_ROP
(
*
opcode
)
);
pdev
->
brush
.
rects
(
pdev
,
&
pdev
->
brush
,
dibs
[
SRC
],
1
,
&
rects
[
SRC
],
OP_ROP
(
*
opcode
)
);
break
;
}
}
...
...
dlls/gdi32/dibdrv/dc.c
View file @
4e032474
...
...
@@ -308,7 +308,7 @@ static BOOL dibdrv_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
if
(
!
pdev
)
return
FALSE
;
clear_dib_info
(
&
pdev
->
dib
);
clear_dib_info
(
&
pdev
->
brush
_
dib
);
clear_dib_info
(
&
pdev
->
brush
.
dib
);
push_dc_driver
(
dev
,
&
pdev
->
dev
,
&
dib_driver
);
return
TRUE
;
}
...
...
@@ -320,7 +320,7 @@ static BOOL dibdrv_DeleteDC( PHYSDEV dev )
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
TRACE
(
"(%p)
\n
"
,
dev
);
free_pattern_brush
(
pdev
);
free_pattern_brush
(
&
pdev
->
brush
);
HeapFree
(
GetProcessHeap
(),
0
,
pdev
);
return
TRUE
;
}
...
...
@@ -389,7 +389,7 @@ static UINT dibdrv_SetDIBColorTable( PHYSDEV dev, UINT pos, UINT count, const RG
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
TRACE
(
"(%p, %d, %d, %p)
\n
"
,
dev
,
pos
,
count
,
colors
);
if
(
pdev
->
dib
.
color_table
)
pdev
->
brush
_
rop
=
-
1
;
/* force re-creating the brush bits */
if
(
pdev
->
dib
.
color_table
)
pdev
->
brush
.
rop
=
-
1
;
/* force re-creating the brush bits */
return
next
->
funcs
->
pSetDIBColorTable
(
next
,
pos
,
count
,
colors
);
}
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
4e032474
...
...
@@ -66,6 +66,22 @@ typedef struct
void
*
xor
;
}
rop_mask_bits
;
struct
dibdrv_physdev
;
typedef
struct
dib_brush
{
UINT
style
;
UINT
hatch
;
INT
rop
;
/* rop2 last used to create the brush bits */
COLORREF
colorref
;
dib_info
dib
;
void
*
and_bits
;
void
*
xor_bits
;
struct
brush_pattern
pattern
;
BOOL
(
*
rects
)(
struct
dibdrv_physdev
*
pdev
,
struct
dib_brush
*
brush
,
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
INT
rop
);
}
dib_brush
;
struct
intensity_range
{
BYTE
r_min
,
r_max
;
...
...
@@ -77,6 +93,7 @@ typedef struct dibdrv_physdev
{
struct
gdi_physdev
dev
;
dib_info
dib
;
dib_brush
brush
;
HRGN
clip
;
DWORD
defer
;
...
...
@@ -90,16 +107,6 @@ typedef struct dibdrv_physdev
dash_pos
dash_pos
;
rop_mask
dash_masks
[
2
];
BOOL
(
*
pen_lines
)(
struct
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
,
BOOL
close
,
HRGN
region
);
/* brush */
UINT
brush_style
;
UINT
brush_hatch
;
INT
brush_rop
;
/* rop2 last used to create the brush bits */
COLORREF
brush_colorref
;
dib_info
brush_dib
;
void
*
brush_and_bits
,
*
brush_xor_bits
;
struct
brush_pattern
brush_pattern
;
BOOL
(
*
brush_rects
)(
struct
dibdrv_physdev
*
pdev
,
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
INT
rop
);
}
dibdrv_physdev
;
#define DEFER_PEN 2
...
...
@@ -223,12 +230,12 @@ extern void reset_dash_origin(dibdrv_physdev *pdev) DECLSPEC_HIDDEN;
extern
void
init_dib_info_from_bitmapinfo
(
dib_info
*
dib
,
const
BITMAPINFO
*
info
,
void
*
bits
,
enum
dib_info_flags
flags
)
DECLSPEC_HIDDEN
;
extern
BOOL
init_dib_info_from_bitmapobj
(
dib_info
*
dib
,
BITMAPOBJ
*
bmp
,
enum
dib_info_flags
flags
)
DECLSPEC_HIDDEN
;
extern
void
free_dib_info
(
dib_info
*
dib
)
DECLSPEC_HIDDEN
;
extern
void
free_pattern_brush
(
dib
drv_physdev
*
pdev
)
DECLSPEC_HIDDEN
;
extern
void
free_pattern_brush
(
dib
_brush
*
brush
)
DECLSPEC_HIDDEN
;
extern
void
copy_dib_color_info
(
dib_info
*
dst
,
const
dib_info
*
src
)
DECLSPEC_HIDDEN
;
extern
BOOL
convert_dib
(
dib_info
*
dst
,
const
dib_info
*
src
)
DECLSPEC_HIDDEN
;
extern
COLORREF
make_rgb_colorref
(
HDC
hdc
,
dib_info
*
dib
,
COLORREF
color
,
BOOL
*
got_pixel
,
DWORD
*
pixel
)
DECLSPEC_HIDDEN
;
extern
DWORD
get_pixel_color
(
dibdrv_physdev
*
pdev
,
COLORREF
color
,
BOOL
mono_fixup
)
DECLSPEC_HIDDEN
;
extern
BOOL
brush_rect
(
dibdrv_physdev
*
pdev
,
const
RECT
*
rect
,
HRGN
clip
,
INT
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
brush_rect
(
dibdrv_physdev
*
pdev
,
dib_brush
*
brush
,
const
RECT
*
rect
,
HRGN
clip
,
INT
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
brush_region
(
dibdrv_physdev
*
pdev
,
HRGN
region
)
DECLSPEC_HIDDEN
;
extern
BOOL
pen_region
(
dibdrv_physdev
*
pdev
,
HRGN
region
)
DECLSPEC_HIDDEN
;
extern
int
get_clipped_rects
(
const
dib_info
*
dib
,
const
RECT
*
rc
,
HRGN
clip
,
struct
clipped_rects
*
clip_rects
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
4e032474
...
...
@@ -490,7 +490,7 @@ BOOL dibdrv_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
TRACE
(
"(%p, %d, %d, %d, %d, %06x)
\n
"
,
dev
,
dst
->
x
,
dst
->
y
,
dst
->
width
,
dst
->
height
,
rop
);
return
brush_rect
(
pdev
,
&
dst
->
visrect
,
pdev
->
clip
,
get_rop2_from_rop
(
rop
)
);
return
brush_rect
(
pdev
,
&
pdev
->
brush
,
&
dst
->
visrect
,
pdev
->
clip
,
get_rop2_from_rop
(
rop
)
);
}
/***********************************************************************
...
...
@@ -512,7 +512,7 @@ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn )
{
rect
=
get_device_rect
(
dev
->
hdc
,
region
->
rects
[
i
].
left
,
region
->
rects
[
i
].
top
,
region
->
rects
[
i
].
right
,
region
->
rects
[
i
].
bottom
,
FALSE
);
brush_rect
(
pdev
,
&
rect
,
pdev
->
clip
,
GetROP2
(
dev
->
hdc
)
);
brush_rect
(
pdev
,
&
pdev
->
brush
,
&
rect
,
pdev
->
clip
,
GetROP2
(
dev
->
hdc
)
);
}
release_wine_region
(
rgn
);
...
...
@@ -700,7 +700,7 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
rect
.
top
+=
(
pdev
->
pen_width
+
1
)
/
2
;
rect
.
right
-=
pdev
->
pen_width
/
2
;
rect
.
bottom
-=
pdev
->
pen_width
/
2
;
ret
=
brush_rect
(
pdev
,
&
rect
,
pdev
->
clip
,
GetROP2
(
dev
->
hdc
)
);
ret
=
brush_rect
(
pdev
,
&
pdev
->
brush
,
&
rect
,
pdev
->
clip
,
GetROP2
(
dev
->
hdc
)
);
}
return
ret
;
}
...
...
dlls/gdi32/dibdrv/objects.c
View file @
4e032474
This diff is collapsed.
Click to expand it.
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