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
ea596f8a
Commit
ea596f8a
authored
May 18, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Force alpha channel to 0 when blitting to depth 32 from a lower depth.
parent
31e4cf93
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
xrender.c
dlls/winex11.drv/xrender.c
+29
-1
No files found.
dlls/winex11.drv/xrender.c
View file @
ea596f8a
...
...
@@ -603,6 +603,32 @@ static Picture get_xrender_picture_source(X11DRV_PDEVICE *physDev, BOOL repeat)
return
info
->
pict_src
;
}
/* return a mask picture used to force alpha to 0 */
static
Picture
get_no_alpha_mask
(
void
)
{
static
Pixmap
pixmap
;
static
Picture
pict
;
wine_tsx11_lock
();
if
(
!
pict
)
{
const
WineXRenderFormat
*
fmt
=
get_xrender_format
(
WXR_FORMAT_A8R8G8B8
);
XRenderPictureAttributes
pa
;
XRenderColor
col
;
pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
1
,
1
,
32
);
pa
.
repeat
=
RepeatNormal
;
pa
.
component_alpha
=
True
;
pict
=
pXRenderCreatePicture
(
gdi_display
,
pixmap
,
fmt
->
pict_format
,
CPRepeat
|
CPComponentAlpha
,
&
pa
);
col
.
red
=
col
.
green
=
col
.
blue
=
0xffff
;
col
.
alpha
=
0
;
pXRenderFillRectangle
(
gdi_display
,
PictOpSrc
,
pict
,
&
col
,
0
,
0
,
1
,
1
);
}
wine_tsx11_unlock
();
return
pict
;
}
static
BOOL
fontcmp
(
LFANDSIZE
*
p1
,
LFANDSIZE
*
p2
)
{
if
(
p1
->
hash
!=
p2
->
hash
)
return
TRUE
;
...
...
@@ -2285,6 +2311,7 @@ BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE
}
else
/* color -> color (can be at different depths) or mono -> mono */
{
if
(
physDevDst
->
depth
==
32
&&
physDevSrc
->
depth
<
32
)
mask_pict
=
get_no_alpha_mask
();
src_pict
=
get_xrender_picture_source
(
physDevSrc
,
use_repeat
);
wine_tsx11_lock
();
...
...
@@ -2292,7 +2319,8 @@ BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE
pixmap
,
dst_format
->
pict_format
,
CPSubwindowMode
|
CPRepeat
,
&
pa
);
xrender_blit
(
PictOpSrc
,
src_pict
,
0
,
dst_pict
,
x_src
,
y_src
,
0
,
0
,
xscale
,
yscale
,
width
,
height
);
xrender_blit
(
PictOpSrc
,
src_pict
,
mask_pict
,
dst_pict
,
x_src
,
y_src
,
0
,
0
,
xscale
,
yscale
,
width
,
height
);
if
(
dst_pict
)
pXRenderFreePicture
(
gdi_display
,
dst_pict
);
wine_tsx11_unlock
();
...
...
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