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
ae43a87d
Commit
ae43a87d
authored
May 21, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Reject D2D1_ALPHA_MODE_STRAIGHT alpha mode for HWND targets.
parent
02919e42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
hwnd_render_target.c
dlls/d2d1/hwnd_render_target.c
+7
-0
d2d1.c
dlls/d2d1/tests/d2d1.c
+1
-4
No files found.
dlls/d2d1/hwnd_render_target.c
View file @
ae43a87d
...
...
@@ -862,6 +862,13 @@ HRESULT d2d_hwnd_render_target_init(struct d2d_hwnd_render_target *render_target
if
(
dxgi_rt_desc
.
pixelFormat
.
alphaMode
==
D2D1_ALPHA_MODE_UNKNOWN
)
dxgi_rt_desc
.
pixelFormat
.
alphaMode
=
D2D1_ALPHA_MODE_IGNORE
;
if
(
dxgi_rt_desc
.
pixelFormat
.
alphaMode
==
D2D1_ALPHA_MODE_STRAIGHT
)
{
IDXGIFactory_Release
(
dxgi_factory
);
WARN
(
"Alpha mode %u is not supported.
\n
"
,
dxgi_rt_desc
.
pixelFormat
.
alphaMode
);
return
D2DERR_UNSUPPORTED_PIXEL_FORMAT
;
}
render_target
->
desc
=
dxgi_rt_desc
;
/* FIXME: should be resolved to either HW or SW type. */
if
(
render_target
->
desc
.
type
==
D2D1_RENDER_TARGET_TYPE_DEFAULT
)
...
...
dlls/d2d1/tests/d2d1.c
View file @
ae43a87d
...
...
@@ -6214,10 +6214,7 @@ static void test_hwnd_target(BOOL d3d11)
hr
=
ID2D1Factory_CreateHwndRenderTarget
(
ctx
.
factory
,
&
desc
,
&
hwnd_rt_desc
,
&
rt
);
if
(
format_tests
[
i
].
expected_failure
)
{
todo_wine
ok
(
FAILED
(
hr
),
"Got unexpected hr %#lx.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
ID2D1HwndRenderTarget_Release
(
rt
);
ok
(
hr
==
D2DERR_UNSUPPORTED_PIXEL_FORMAT
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
winetest_pop_context
();
continue
;
}
...
...
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