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
76272e07
Commit
76272e07
authored
Oct 10, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use BI_BITFIELDS to indicate that a 32-bpp DIB doesn't have an alpha channel.
parent
34b70728
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
5 deletions
+26
-5
bitblt.c
dlls/gdi32/bitblt.c
+6
-2
bitblt.c
dlls/gdi32/dibdrv/bitblt.c
+6
-2
dc.c
dlls/gdi32/dibdrv/dc.c
+13
-0
xrender.c
dlls/winex11.drv/xrender.c
+1
-1
No files found.
dlls/gdi32/bitblt.c
View file @
76272e07
...
...
@@ -357,6 +357,7 @@ DWORD nulldrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct gdi_image_
BITMAPINFO
*
dst_info
=
(
BITMAPINFO
*
)
buffer
;
struct
gdi_image_bits
dst_bits
;
struct
bitblt_coords
orig_dst
;
DWORD
*
masks
=
(
DWORD
*
)
info
->
bmiColors
;
DC
*
dc
=
get_nulldrv_dc
(
dev
);
DWORD
err
;
...
...
@@ -364,7 +365,7 @@ DWORD nulldrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct gdi_image_
if
(
info
->
bmiHeader
.
biBitCount
!=
32
)
goto
update_format
;
if
(
info
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
)
{
DWORD
*
masks
=
(
DWORD
*
)
info
->
bmiColors
;
if
(
blend
.
AlphaFormat
&
AC_SRC_ALPHA
)
return
ERROR_INVALID_PARAMETER
;
if
(
masks
[
0
]
!=
0xff0000
||
masks
[
1
]
!=
0x00ff00
||
masks
[
2
]
!=
0x0000ff
)
goto
update_format
;
}
...
...
@@ -390,8 +391,11 @@ update_format:
info
->
bmiHeader
.
biPlanes
=
1
;
info
->
bmiHeader
.
biBitCount
=
32
;
info
->
bmiHeader
.
biCompression
=
BI_
RGB
;
info
->
bmiHeader
.
biCompression
=
BI_
BITFIELDS
;
info
->
bmiHeader
.
biClrUsed
=
0
;
masks
[
0
]
=
0xff0000
;
masks
[
1
]
=
0x00ff00
;
masks
[
2
]
=
0x0000ff
;
return
ERROR_BAD_FORMAT
;
}
...
...
dlls/gdi32/dibdrv/bitblt.c
View file @
76272e07
...
...
@@ -1001,6 +1001,7 @@ DWORD dibdrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct gdi_image_b
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
dib_info
src_dib
;
DWORD
*
masks
=
(
DWORD
*
)
info
->
bmiColors
;
TRACE
(
"%p %p
\n
"
,
dev
,
info
);
...
...
@@ -1008,7 +1009,7 @@ DWORD dibdrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct gdi_image_b
if
(
info
->
bmiHeader
.
biBitCount
!=
32
)
goto
update_format
;
if
(
info
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
)
{
DWORD
*
masks
=
(
DWORD
*
)
info
->
bmiColors
;
if
(
blend
.
AlphaFormat
&
AC_SRC_ALPHA
)
return
ERROR_INVALID_PARAMETER
;
if
(
masks
[
0
]
!=
0xff0000
||
masks
[
1
]
!=
0x00ff00
||
masks
[
2
]
!=
0x0000ff
)
goto
update_format
;
}
...
...
@@ -1027,8 +1028,11 @@ update_format:
info
->
bmiHeader
.
biPlanes
=
1
;
info
->
bmiHeader
.
biBitCount
=
32
;
info
->
bmiHeader
.
biCompression
=
BI_
RGB
;
info
->
bmiHeader
.
biCompression
=
BI_
BITFIELDS
;
info
->
bmiHeader
.
biClrUsed
=
0
;
masks
[
0
]
=
0xff0000
;
masks
[
1
]
=
0x00ff00
;
masks
[
2
]
=
0x0000ff
;
return
ERROR_BAD_FORMAT
;
}
...
...
dlls/gdi32/dibdrv/dc.c
View file @
76272e07
...
...
@@ -760,6 +760,19 @@ static DWORD windrv_GetImage( PHYSDEV dev, BITMAPINFO *info,
lock_surface
(
physdev
->
surface
);
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetImage
);
ret
=
dev
->
funcs
->
pGetImage
(
dev
,
info
,
bits
,
src
);
/* don't return alpha if original surface doesn't support it */
if
(
info
->
bmiHeader
.
biBitCount
==
32
&&
info
->
bmiHeader
.
biCompression
==
BI_RGB
&&
physdev
->
dibdrv
->
dib
.
compression
==
BI_BITFIELDS
)
{
DWORD
*
colors
=
(
DWORD
*
)
info
->
bmiColors
;
colors
[
0
]
=
0xff0000
;
colors
[
1
]
=
0x00ff00
;
colors
[
2
]
=
0x0000ff
;
info
->
bmiHeader
.
biCompression
=
BI_BITFIELDS
;
}
if
(
!
bits
->
is_copy
)
{
/* use the freeing callback to unlock the surface */
...
...
dlls/winex11.drv/xrender.c
View file @
76272e07
...
...
@@ -2077,7 +2077,7 @@ static DWORD xrenderdrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct
format
=
get_xrender_format_from_bitmapinfo
(
info
);
if
(
!
(
func
.
AlphaFormat
&
AC_SRC_ALPHA
))
format
=
get_format_without_alpha
(
format
);
else
if
(
format
!=
WXR_FORMAT_A8R8G8B8
)
else
if
(
format
!=
WXR_FORMAT_A8R8G8B8
||
info
->
bmiHeader
.
biCompression
!=
BI_RGB
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
(
pict_format
=
pict_formats
[
format
]))
goto
update_format
;
...
...
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