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
7ea59c10
Commit
7ea59c10
authored
Dec 05, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use dithering also for 1-bpp gradients.
parent
59f347b7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
primitives.c
dlls/gdi32/dibdrv/primitives.c
+13
-13
graphics.c
dlls/winex11.drv/graphics.c
+2
-2
xrender.c
dlls/winex11.drv/xrender.c
+2
-2
No files found.
dlls/gdi32/dibdrv/primitives.c
View file @
7ea59c10
...
...
@@ -4491,27 +4491,28 @@ static BOOL gradient_rect_1( const dib_info *dib, const RECT *rc, const TRIVERTE
switch
(
mode
)
{
case
GRADIENT_FILL_RECT_H
:
for
(
y
=
rc
->
top
;
y
<
min
(
rc
->
top
+
16
,
rc
->
bottom
);
y
++
,
ptr
+=
dib
->
stride
)
{
for
(
x
=
rc
->
left
;
x
<
rc
->
right
;
x
++
)
{
DWORD
val
=
gradient_rgb_24
(
v
,
x
-
v
[
0
].
x
,
v
[
1
].
x
-
v
[
0
].
x
);
val
=
rgb_to_pixel_colortable
(
dib
,
val
>>
16
,
val
>>
8
,
val
)
?
0xff
:
0
;
BYTE
val
=
gradient_rgb_8
(
dib
,
v
,
x
-
v
[
0
].
x
,
v
[
1
].
x
-
v
[
0
].
x
,
x
,
y
)
?
0xff
:
0
;
ptr
[
x
/
8
]
=
(
ptr
[
x
/
8
]
&
~
pixel_masks_1
[
x
%
8
])
|
(
val
&
pixel_masks_1
[
x
%
8
]);
}
for
(
y
=
rc
->
top
+
1
;
y
<
rc
->
bottom
;
y
++
,
ptr
+=
dib
->
stride
)
}
for
(
;
y
<
rc
->
bottom
;
y
++
,
ptr
+=
dib
->
stride
)
for
(
x
=
rc
->
left
;
x
<
rc
->
right
;
x
++
)
ptr
[
dib
->
stride
+
x
/
8
]
=
(
ptr
[
dib
->
stride
+
x
/
8
]
&
~
pixel_masks_1
[
x
%
8
])
|
(
ptr
[
x
/
8
]
&
pixel_masks_1
[
x
%
8
]);
ptr
[
x
/
8
]
=
(
ptr
[
x
/
8
]
&
~
pixel_masks_1
[
x
%
8
])
|
(
ptr
[
x
/
8
-
16
*
dib
->
stride
]
&
pixel_masks_1
[
x
%
8
]);
break
;
case
GRADIENT_FILL_RECT_V
:
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
)
for
(
y
=
rc
->
top
;
y
<
rc
->
bottom
;
y
++
,
ptr
+=
dib
->
stride
)
{
DWORD
val
=
gradient_rgb_24
(
v
,
y
-
v
[
0
].
y
,
v
[
1
].
y
-
v
[
0
].
y
);
val
=
rgb_to_pixel_colortable
(
dib
,
val
>>
16
,
val
>>
8
,
val
)
?
0xff
:
0
;
BYTE
values
[
16
];
for
(
x
=
0
;
x
<
16
;
x
++
)
values
[
x
]
=
gradient_rgb_8
(
dib
,
v
,
y
-
v
[
0
].
y
,
v
[
1
].
y
-
v
[
0
].
y
,
x
,
y
)
?
0xff
:
0
;
for
(
x
=
rc
->
left
;
x
<
rc
->
right
;
x
++
)
ptr
[
x
/
8
]
=
(
ptr
[
x
/
8
]
&
~
pixel_masks_1
[
x
%
8
])
|
(
val
&
pixel_masks_1
[
x
%
8
]);
ptr
+=
dib
->
stride
;
ptr
[
x
/
8
]
=
(
ptr
[
x
/
8
]
&
~
pixel_masks_1
[
x
%
8
])
|
(
values
[
x
%
16
]
&
pixel_masks_1
[
x
%
8
]);
}
break
;
...
...
@@ -4522,8 +4523,7 @@ static BOOL gradient_rect_1( const dib_info *dib, const RECT *rc, const TRIVERTE
triangle_coords
(
v
,
rc
,
y
,
&
left
,
&
right
);
for
(
x
=
left
;
x
<
right
;
x
++
)
{
DWORD
val
=
gradient_triangle_24
(
v
,
x
,
y
,
det
);
val
=
rgb_to_pixel_colortable
(
dib
,
val
>>
16
,
val
>>
8
,
val
)
?
0xff
:
0
;
BYTE
val
=
gradient_triangle_8
(
dib
,
v
,
x
,
y
,
det
)
?
0xff
:
0
;
ptr
[
x
/
8
]
=
(
ptr
[
x
/
8
]
&
~
pixel_masks_1
[
x
%
8
])
|
(
val
&
pixel_masks_1
[
x
%
8
]);
}
}
...
...
dlls/winex11.drv/graphics.c
View file @
7ea59c10
...
...
@@ -1506,8 +1506,8 @@ BOOL X11DRV_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG nvert,
unsigned
int
i
;
XGCValues
val
;
/*
4, 8, and
16-bpp use dithering */
if
(
physdev
->
depth
>=
4
&&
physdev
->
depth
<=
16
)
goto
fallback
;
/*
<=
16-bpp use dithering */
if
(
physdev
->
depth
<=
16
)
goto
fallback
;
switch
(
mode
)
{
...
...
dlls/winex11.drv/xrender.c
View file @
7ea59c10
...
...
@@ -2543,8 +2543,8 @@ static BOOL xrenderdrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG n
if
(
!
X11DRV_XRender_Installed
)
goto
fallback
;
if
(
!
pXRenderCreateLinearGradient
)
goto
fallback
;
/* 16-bpp uses dithering */
if
(
!
physdev
->
pict_format
||
physdev
->
pict_format
->
depth
=
=
16
)
goto
fallback
;
/*
<=
16-bpp uses dithering */
if
(
!
physdev
->
pict_format
||
physdev
->
pict_format
->
depth
<
=
16
)
goto
fallback
;
switch
(
mode
)
{
...
...
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