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
05917020
Commit
05917020
authored
Mar 09, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Map the black and white entries to the DIB color table after dithering.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
11fb78d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
primitives.c
dlls/gdi32/dibdrv/primitives.c
+9
-5
dib.c
dlls/gdi32/tests/dib.c
+2
-2
No files found.
dlls/gdi32/dibdrv/primitives.c
View file @
05917020
...
...
@@ -2141,12 +2141,16 @@ static DWORD rgb_to_pixel_mono(const dib_info *dib, BOOL dither, int x, int y,
{
DWORD
ret
;
if
(
dither
)
ret
=
((
30
*
r
+
59
*
g
+
11
*
b
)
/
100
+
bayer_16x16
[
y
%
16
][
x
%
16
])
>
255
;
else
if
(
dib
->
color_table_size
==
1
)
ret
=
(
src_pixel
==
bg_pixel
);
else
if
(
dib
->
color_table_size
!=
1
)
{
if
(
dither
)
{
if
(((
30
*
r
+
59
*
g
+
11
*
b
)
/
100
+
bayer_16x16
[
y
%
16
][
x
%
16
])
>
255
)
r
=
g
=
b
=
255
;
else
r
=
g
=
b
=
0
;
}
ret
=
rgb_to_pixel_colortable
(
dib
,
r
,
g
,
b
);
}
else
ret
=
(
src_pixel
==
bg_pixel
);
/* only match raw pixel value */
return
ret
?
0xff
:
0
;
}
...
...
dlls/gdi32/tests/dib.c
View file @
05917020
...
...
@@ -1880,7 +1880,7 @@ static void draw_graphics(HDC hdc, const BITMAPINFO *bmi, BYTE *bits)
if
(
bmi
->
bmiHeader
.
biBitCount
==
8
&&
bmi
->
bmiHeader
.
biClrUsed
==
256
)
/* 8-bpp grayscale broken on NT4 */
compare_hash_broken_todo
(
hdc
,
bmi
,
bits
,
"bottom-up 8888 dib brush patblt"
,
1
,
FALSE
);
else
compare_hash_broken_todo
(
hdc
,
bmi
,
bits
,
"bottom-up 8888 dib brush patblt"
,
dib_is_1bpp
?
2
:
0
,
dib_is_1bpp
);
compare_hash_broken_todo
(
hdc
,
bmi
,
bits
,
"bottom-up 8888 dib brush patblt"
,
dib_is_1bpp
?
2
:
0
,
FALSE
);
SelectObject
(
hdc
,
orig_brush
);
DeleteObject
(
dib_brush
);
...
...
@@ -1910,7 +1910,7 @@ static void draw_graphics(HDC hdc, const BITMAPINFO *bmi, BYTE *bits)
if
(
bmi
->
bmiHeader
.
biBitCount
==
8
&&
bmi
->
bmiHeader
.
biClrUsed
==
256
)
/* 8-bpp grayscale broken on NT4 */
compare_hash_broken_todo
(
hdc
,
bmi
,
bits
,
"top-down 24 bpp brush patblt"
,
1
,
FALSE
);
else
compare_hash_broken_todo
(
hdc
,
bmi
,
bits
,
"top-down 24 bpp brush patblt"
,
dib_is_1bpp
?
2
:
0
,
dib_is_1bpp
);
compare_hash_broken_todo
(
hdc
,
bmi
,
bits
,
"top-down 24 bpp brush patblt"
,
dib_is_1bpp
?
2
:
0
,
FALSE
);
SelectObject
(
hdc
,
orig_brush
);
DeleteObject
(
dib_brush
);
...
...
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