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
a0f40f2a
Commit
a0f40f2a
authored
Jul 28, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Move ROP mode to DC_ATTR.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ed1fbcf7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
26 deletions
+18
-26
dc.c
dlls/gdi32/dc.c
+4
-21
graphics.c
dlls/gdi32/dibdrv/graphics.c
+2
-2
objects.c
dlls/gdi32/dibdrv/objects.c
+2
-2
gdidc.c
dlls/gdi32/gdidc.c
+9
-0
ntgdi_private.h
dlls/gdi32/ntgdi_private.h
+0
-1
ntgdi.h
include/ntgdi.h
+1
-0
No files found.
dlls/gdi32/dc.c
View file @
a0f40f2a
...
...
@@ -82,7 +82,7 @@ static void set_initial_dc_state( DC *dc )
dc
->
miterLimit
=
10
.
0
f
;
/* 10.0 is the default, from MSDN */
dc
->
layout
=
0
;
dc
->
font_code_page
=
CP_ACP
;
dc
->
ROPmode
=
R2_COPYPEN
;
dc
->
attr
->
rop_mode
=
R2_COPYPEN
;
dc
->
polyFillMode
=
ALTERNATE
;
dc
->
stretchBltMode
=
BLACKONWHITE
;
dc
->
relAbsMode
=
ABSOLUTE
;
...
...
@@ -399,7 +399,6 @@ INT CDECL nulldrv_SaveDC( PHYSDEV dev )
newdc
->
hFont
=
dc
->
hFont
;
newdc
->
hBitmap
=
dc
->
hBitmap
;
newdc
->
hPalette
=
dc
->
hPalette
;
newdc
->
ROPmode
=
dc
->
ROPmode
;
newdc
->
polyFillMode
=
dc
->
polyFillMode
;
newdc
->
stretchBltMode
=
dc
->
stretchBltMode
;
newdc
->
relAbsMode
=
dc
->
relAbsMode
;
...
...
@@ -472,7 +471,7 @@ BOOL CDECL nulldrv_RestoreDC( PHYSDEV dev, INT level )
if
(
!
PATH_RestorePath
(
dc
,
dcs
))
return
FALSE
;
dc
->
layout
=
dcs
->
layout
;
dc
->
ROPmode
=
dcs
->
ROP
mode
;
dc
->
attr
->
rop_mode
=
dcs
->
attr
->
rop_
mode
;
dc
->
polyFillMode
=
dcs
->
polyFillMode
;
dc
->
stretchBltMode
=
dcs
->
stretchBltMode
;
dc
->
relAbsMode
=
dcs
->
relAbsMode
;
...
...
@@ -1556,22 +1555,6 @@ INT WINAPI GetRelAbs( HDC hdc, DWORD dwIgnore )
/***********************************************************************
* GetROP2 (GDI32.@)
*/
INT
WINAPI
GetROP2
(
HDC
hdc
)
{
INT
ret
=
0
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
dc
)
{
ret
=
dc
->
ROPmode
;
release_dc_ptr
(
dc
);
}
return
ret
;
}
/***********************************************************************
* SetROP2 (GDI32.@)
*/
INT
WINAPI
SetROP2
(
HDC
hdc
,
INT
mode
)
...
...
@@ -1590,8 +1573,8 @@ INT WINAPI SetROP2( HDC hdc, INT mode )
mode
=
physdev
->
funcs
->
pSetROP2
(
physdev
,
mode
);
if
(
mode
)
{
ret
=
dc
->
ROP
mode
;
dc
->
ROP
mode
=
mode
;
ret
=
dc
->
attr
->
rop_
mode
;
dc
->
attr
->
rop_
mode
=
mode
;
}
release_dc_ptr
(
dc
);
}
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
a0f40f2a
...
...
@@ -73,7 +73,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
->
brush_org
,
dc
->
ROP
mode
);
&
dc
->
brush_org
,
dc
->
attr
->
rop_
mode
);
free_clipped_rects
(
&
clipped_rects
);
return
ret
;
}
...
...
@@ -1590,7 +1590,7 @@ COLORREF CDECL dibdrv_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color )
color
=
pdev
->
dib
.
funcs
->
pixel_to_colorref
(
&
pdev
->
dib
,
pixel
);
if
(
!
get_clipped_rects
(
&
pdev
->
dib
,
&
rect
,
pdev
->
clip
,
&
clipped_rects
))
return
color
;
fill_with_pixel
(
dc
,
&
pdev
->
dib
,
pixel
,
clipped_rects
.
count
,
clipped_rects
.
rects
,
dc
->
ROP
mode
);
fill_with_pixel
(
dc
,
&
pdev
->
dib
,
pixel
,
clipped_rects
.
count
,
clipped_rects
.
rects
,
dc
->
attr
->
rop_
mode
);
free_clipped_rects
(
&
clipped_rects
);
return
color
;
}
...
...
dlls/gdi32/dibdrv/objects.c
View file @
a0f40f2a
...
...
@@ -819,7 +819,7 @@ static BOOL solid_pen_lines(dibdrv_physdev *pdev, int num, POINT *pts, BOOL clos
DWORD
color
,
and
,
xor
;
color
=
get_pixel_color
(
dc
,
&
pdev
->
dib
,
pdev
->
pen_brush
.
colorref
,
TRUE
);
calc_and_xor_masks
(
dc
->
ROP
mode
,
color
,
&
and
,
&
xor
);
calc_and_xor_masks
(
dc
->
attr
->
rop_
mode
,
color
,
&
and
,
&
xor
);
for
(
i
=
0
;
i
<
num
-
1
;
i
++
)
if
(
!
solid_pen_line
(
pdev
,
pts
+
i
,
pts
+
i
+
1
,
and
,
xor
))
...
...
@@ -1229,7 +1229,7 @@ static BOOL dashed_pen_lines(dibdrv_physdev *pdev, int num, POINT *pts, BOOL clo
}
else
{
get_color_masks
(
dc
,
&
pdev
->
dib
,
dc
->
ROP
mode
,
pdev
->
pen_brush
.
colorref
,
get_color_masks
(
dc
,
&
pdev
->
dib
,
dc
->
attr
->
rop_
mode
,
pdev
->
pen_brush
.
colorref
,
pdev
->
pen_is_ext
?
TRANSPARENT
:
dc
->
attr
->
background_mode
,
&
pdev
->
dash_masks
[
1
],
&
pdev
->
dash_masks
[
0
]
);
...
...
dlls/gdi32/gdidc.c
View file @
a0f40f2a
...
...
@@ -109,6 +109,15 @@ BOOL WINAPI GetCurrentPositionEx( HDC hdc, POINT *point )
}
/***********************************************************************
* GetROP2 (GDI32.@)
*/
INT
WINAPI
GetROP2
(
HDC
hdc
)
{
DC_ATTR
*
dc_attr
=
get_dc_attr
(
hdc
);
return
dc_attr
?
dc_attr
->
rop_mode
:
0
;
}
/***********************************************************************
* SetPixel (GDI32.@)
*/
COLORREF
WINAPI
SetPixel
(
HDC
hdc
,
INT
x
,
INT
y
,
COLORREF
color
)
...
...
dlls/gdi32/ntgdi_private.h
View file @
a0f40f2a
...
...
@@ -117,7 +117,6 @@ typedef struct tagDC
const
struct
font_gamma_ramp
*
font_gamma_ramp
;
UINT
font_code_page
;
WORD
ROPmode
;
WORD
polyFillMode
;
WORD
stretchBltMode
;
WORD
relAbsMode
;
...
...
include/ntgdi.h
View file @
a0f40f2a
...
...
@@ -103,6 +103,7 @@ typedef struct DC_ATTR
INT
graphics_mode
;
WORD
text_align
;
WORD
background_mode
;
WORD
rop_mode
;
void
*
emf
;
}
DC_ATTR
;
...
...
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