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
568afc21
Commit
568afc21
authored
Apr 13, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Move the pen/brush_region helpers to graphics.c and avoid redundant clipping.
parent
2b1da8c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
18 deletions
+14
-18
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+0
-2
graphics.c
dlls/gdi32/dibdrv/graphics.c
+14
-2
objects.c
dlls/gdi32/dibdrv/objects.c
+0
-14
No files found.
dlls/gdi32/dibdrv/dibdrv.h
View file @
568afc21
...
...
@@ -245,8 +245,6 @@ 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
,
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
;
extern
int
clip_line
(
const
POINT
*
start
,
const
POINT
*
end
,
const
RECT
*
clip
,
const
bres_params
*
params
,
POINT
*
pt1
,
POINT
*
pt2
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
568afc21
...
...
@@ -26,6 +26,20 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dib
);
/* paint a region with the brush (note: the region can be modified) */
static
BOOL
brush_region
(
dibdrv_physdev
*
pdev
,
HRGN
region
)
{
if
(
pdev
->
clip
)
CombineRgn
(
region
,
region
,
pdev
->
clip
,
RGN_AND
);
return
brush_rect
(
pdev
,
&
pdev
->
brush
,
NULL
,
region
,
GetROP2
(
pdev
->
dev
.
hdc
));
}
/* paint a region with the pen (note: the region can be modified) */
static
BOOL
pen_region
(
dibdrv_physdev
*
pdev
,
HRGN
region
)
{
if
(
pdev
->
clip
)
CombineRgn
(
region
,
region
,
pdev
->
clip
,
RGN_AND
);
return
brush_rect
(
pdev
,
&
pdev
->
pen_brush
,
NULL
,
region
,
GetROP2
(
pdev
->
dev
.
hdc
));
}
static
RECT
get_device_rect
(
HDC
hdc
,
int
left
,
int
top
,
int
right
,
int
bottom
,
BOOL
rtl_correction
)
{
RECT
rect
;
...
...
@@ -813,7 +827,6 @@ BOOL dibdrv_LineTo( PHYSDEV dev, INT x, INT y )
if
(
region
)
{
if
(
pdev
->
clip
)
CombineRgn
(
region
,
region
,
pdev
->
clip
,
RGN_AND
);
ret
=
pen_region
(
pdev
,
region
);
DeleteObject
(
region
);
}
...
...
@@ -968,7 +981,6 @@ BOOL dibdrv_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWO
if
(
outline
)
{
if
(
pdev
->
clip
)
CombineRgn
(
outline
,
outline
,
pdev
->
clip
,
RGN_AND
);
ret
=
pen_region
(
pdev
,
outline
);
DeleteObject
(
outline
);
}
...
...
dlls/gdi32/dibdrv/objects.c
View file @
568afc21
...
...
@@ -2162,17 +2162,3 @@ BOOL brush_rect(dibdrv_physdev *pdev, dib_brush *brush, const RECT *rect, HRGN c
free_clipped_rects
(
&
clipped_rects
);
return
ret
;
}
/* paint a region with the brush (note: the region can be modified) */
BOOL
brush_region
(
dibdrv_physdev
*
pdev
,
HRGN
region
)
{
if
(
pdev
->
clip
)
CombineRgn
(
region
,
region
,
pdev
->
clip
,
RGN_AND
);
return
brush_rect
(
pdev
,
&
pdev
->
brush
,
NULL
,
region
,
GetROP2
(
pdev
->
dev
.
hdc
));
}
/* paint a region with the pen (note: the region can be modified) */
BOOL
pen_region
(
dibdrv_physdev
*
pdev
,
HRGN
region
)
{
if
(
pdev
->
clip
)
CombineRgn
(
region
,
region
,
pdev
->
clip
,
RGN_AND
);
return
brush_rect
(
pdev
,
&
pdev
->
pen_brush
,
NULL
,
region
,
GetROP2
(
pdev
->
dev
.
hdc
));
}
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