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
cf386b8b
Commit
cf386b8b
authored
Jul 28, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Jul 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Pass a DC pointer to get_mono_dc_colors().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4b815d52
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
bitblt.c
dlls/gdi32/bitblt.c
+6
-6
dib.c
dlls/gdi32/dib.c
+1
-1
bitblt.c
dlls/gdi32/dibdrv/bitblt.c
+2
-1
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-1
No files found.
dlls/gdi32/bitblt.c
View file @
cf386b8b
...
...
@@ -222,10 +222,10 @@ static DWORD blend_bits( const BITMAPINFO *src_info, const struct gdi_image_bits
}
/* helper to retrieve either both colors or only the background color for monochrome blits */
void
get_mono_dc_colors
(
HDC
h
dc
,
BITMAPINFO
*
info
,
int
count
)
void
get_mono_dc_colors
(
DC
*
dc
,
BITMAPINFO
*
info
,
int
count
)
{
RGBQUAD
*
colors
=
info
->
bmiColors
;
COLORREF
color
=
GetBkColor
(
hdc
)
;
COLORREF
color
=
dc
->
backgroundColor
;
colors
[
count
-
1
].
rgbRed
=
GetRValue
(
color
);
colors
[
count
-
1
].
rgbGreen
=
GetGValue
(
color
);
...
...
@@ -234,7 +234,7 @@ void get_mono_dc_colors( HDC hdc, BITMAPINFO *info, int count )
if
(
count
>
1
)
{
color
=
GetTextColor
(
hdc
)
;
color
=
dc
->
textColor
;
colors
[
0
].
rgbRed
=
GetRValue
(
color
);
colors
[
0
].
rgbGreen
=
GetGValue
(
color
);
colors
[
0
].
rgbBlue
=
GetBValue
(
color
);
...
...
@@ -275,7 +275,7 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
/* 1-bpp source without a color table uses the destination DC colors */
if
(
src_info
->
bmiHeader
.
biBitCount
==
1
&&
!
src_info
->
bmiHeader
.
biClrUsed
)
get_mono_dc_colors
(
d
st_dev
->
hdc
,
src_info
,
2
);
get_mono_dc_colors
(
d
c_dst
,
src_info
,
2
);
if
(
dst_info
->
bmiHeader
.
biBitCount
==
1
&&
!
dst_colors
)
{
...
...
@@ -283,9 +283,9 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
* that contains only the background color; except with a 1-bpp source,
* in which case it uses the source colors */
if
(
src_info
->
bmiHeader
.
biBitCount
>
1
)
get_mono_dc_colors
(
src_dev
->
hd
c
,
dst_info
,
1
);
get_mono_dc_colors
(
dc_sr
c
,
dst_info
,
1
);
else
get_mono_dc_colors
(
src_dev
->
hd
c
,
dst_info
,
2
);
get_mono_dc_colors
(
dc_sr
c
,
dst_info
,
2
);
}
if
(
!
(
err
=
convert_bits
(
src_info
,
src
,
dst_info
,
&
bits
)))
...
...
dlls/gdi32/dib.c
View file @
cf386b8b
...
...
@@ -581,7 +581,7 @@ INT nulldrv_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst, INT he
if
(
dst_info
->
bmiHeader
.
biBitCount
==
1
&&
!
dst_colors
)
{
if
(
src_info
->
bmiHeader
.
biBitCount
>
1
)
get_mono_dc_colors
(
d
ev
->
hd
c
,
dst_info
,
1
);
get_mono_dc_colors
(
dc
,
dst_info
,
1
);
else
{
memcpy
(
dst_info
->
bmiColors
,
src_info
->
bmiColors
,
2
*
sizeof
(
dst_info
->
bmiColors
[
0
])
);
...
...
dlls/gdi32/dibdrv/bitblt.c
View file @
cf386b8b
...
...
@@ -985,6 +985,7 @@ DWORD dibdrv_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info,
const
struct
gdi_image_bits
*
bits
,
struct
bitblt_coords
*
src
,
struct
bitblt_coords
*
dst
,
DWORD
rop
)
{
DC
*
dc
=
get_physdev_dc
(
dev
);
struct
clipped_rects
clipped_rects
;
DWORD
ret
=
ERROR_SUCCESS
;
dib_info
src_dib
;
...
...
@@ -1000,7 +1001,7 @@ DWORD dibdrv_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info,
/* For mask_rect, 1-bpp source without a color table uses the destination DC colors */
if
(
info
->
bmiHeader
.
biBitCount
==
1
&&
pdev
->
dib
.
bit_count
!=
1
&&
!
info
->
bmiHeader
.
biClrUsed
)
get_mono_dc_colors
(
d
ev
->
hd
c
,
info
,
2
);
get_mono_dc_colors
(
dc
,
info
,
2
);
init_dib_info_from_bitmapinfo
(
&
src_dib
,
info
,
bits
->
ptr
);
src_dib
.
bits
.
is_copy
=
bits
->
is_copy
;
...
...
dlls/gdi32/gdi_private.h
View file @
cf386b8b
...
...
@@ -199,7 +199,7 @@ extern BOOL intersect_vis_rectangles( struct bitblt_coords *dst, struct bitblt_c
extern
DWORD
stretch_bits
(
const
BITMAPINFO
*
src_info
,
struct
bitblt_coords
*
src
,
BITMAPINFO
*
dst_info
,
struct
bitblt_coords
*
dst
,
struct
gdi_image_bits
*
bits
,
int
mode
)
DECLSPEC_HIDDEN
;
extern
void
get_mono_dc_colors
(
HDC
h
dc
,
BITMAPINFO
*
info
,
int
count
)
DECLSPEC_HIDDEN
;
extern
void
get_mono_dc_colors
(
DC
*
dc
,
BITMAPINFO
*
info
,
int
count
)
DECLSPEC_HIDDEN
;
/* brush.c */
extern
BOOL
store_brush_pattern
(
LOGBRUSH
*
brush
,
struct
brush_pattern
*
pattern
)
DECLSPEC_HIDDEN
;
...
...
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