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
ab081aa8
Commit
ab081aa8
authored
Nov 11, 2009
by
Peter Urbanec
Committed by
Alexandre Julliard
Nov 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Implement AlphaBlend mode for the case where SourceConstantAlpha is…
winex11: Implement AlphaBlend mode for the case where SourceConstantAlpha is combined with source alpha.
parent
872feb47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
7 deletions
+28
-7
xrender.c
dlls/winex11.drv/xrender.c
+28
-7
No files found.
dlls/winex11.drv/xrender.c
View file @
ab081aa8
...
...
@@ -1956,9 +1956,6 @@ BOOL CDECL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT wid
return
FALSE
;
}
if
((
blendfn
.
AlphaFormat
&
AC_SRC_ALPHA
)
&&
blendfn
.
SourceConstantAlpha
!=
0xff
)
FIXME
(
"Ignoring SourceConstantAlpha %d for AC_SRC_ALPHA
\n
"
,
blendfn
.
SourceConstantAlpha
);
if
(
dib
.
dsBm
.
bmBitsPixel
!=
32
)
{
FIXME
(
"not a 32 bpp dibsection
\n
"
);
return
FALSE
;
...
...
@@ -1979,11 +1976,35 @@ BOOL CDECL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT wid
if
(
blendfn
.
AlphaFormat
&
AC_SRC_ALPHA
)
{
for
(;
y
>=
y2
;
y
--
)
if
(
blendfn
.
SourceConstantAlpha
==
0xff
)
{
memcpy
(
dstbits
,
(
char
*
)
dib
.
dsBm
.
bmBits
+
y
*
dib
.
dsBm
.
bmWidthBytes
+
xSrc
*
4
,
widthSrc
*
4
);
dstbits
+=
(
top_down
?
-
1
:
1
)
*
widthSrc
;
for
(;
y
>=
y2
;
y
--
)
{
memcpy
(
dstbits
,
(
char
*
)
dib
.
dsBm
.
bmBits
+
y
*
dib
.
dsBm
.
bmWidthBytes
+
xSrc
*
4
,
widthSrc
*
4
);
dstbits
+=
(
top_down
?
-
1
:
1
)
*
widthSrc
;
}
}
else
{
/* SourceConstantAlpha combined with source alpha */
for
(;
y
>=
y2
;
y
--
)
{
int
x
;
DWORD
*
srcbits
=
(
DWORD
*
)((
char
*
)
dib
.
dsBm
.
bmBits
+
y
*
dib
.
dsBm
.
bmWidthBytes
)
+
xSrc
;
for
(
x
=
0
;
x
<
widthSrc
;
x
++
)
{
DWORD
argb
=
*
srcbits
++
;
BYTE
*
s
=
(
BYTE
*
)
&
argb
;
s
[
0
]
=
(
s
[
0
]
*
blendfn
.
SourceConstantAlpha
)
/
255
;
s
[
1
]
=
(
s
[
1
]
*
blendfn
.
SourceConstantAlpha
)
/
255
;
s
[
2
]
=
(
s
[
2
]
*
blendfn
.
SourceConstantAlpha
)
/
255
;
s
[
3
]
=
(
s
[
3
]
*
blendfn
.
SourceConstantAlpha
)
/
255
;
*
dstbits
++
=
argb
;
}
if
(
top_down
)
/* we traversed the row forward so we should go back by two rows */
dstbits
-=
2
*
widthSrc
;
}
}
}
else
...
...
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