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
56b50f15
Commit
56b50f15
authored
Jul 30, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1/tests: Use test context for command list test.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
a8d7d1e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
d2d1.c
dlls/d2d1/tests/d2d1.c
+8
-14
No files found.
dlls/d2d1/tests/d2d1.c
View file @
56b50f15
...
...
@@ -9445,7 +9445,6 @@ static void test_command_list(BOOL d3d11)
ID2D1CommandList
*
command_list
;
struct
d2d1_test_context
ctx
;
ID2D1Geometry
*
geometry
;
ID2D1Factory1
*
factory
;
ID2D1RenderTarget
*
rt
;
D2D1_POINT_2F
p0
,
p1
;
ID2D1Bitmap
*
bitmap
;
...
...
@@ -9460,23 +9459,20 @@ static void test_command_list(BOOL d3d11)
if
(
!
init_test_context
(
&
ctx
,
d3d11
))
return
;
if
(
FAILED
(
D2D1CreateFactory
(
D2D1_FACTORY_TYPE_SINGLE_THREADED
,
&
IID_ID2D1Factory1
,
NULL
,
(
void
**
)
&
factory
))
)
if
(
!
ctx
.
factory1
)
{
win_skip
(
"
ID2D1Factory1 is
not supported.
\n
"
);
win_skip
(
"
Command lists are
not supported.
\n
"
);
release_test_context
(
&
ctx
);
return
;
}
device_context
=
create_device_context
(
factory
,
ctx
.
device
,
d3d11
);
ok
(
device_context
!=
NULL
,
"Failed to create device context.
\n
"
);
device_context
=
ctx
.
context
;
hr
=
ID2D1DeviceContext_CreateCommandList
(
device_context
,
&
command_list
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
ID2D1DeviceContext_Release
(
device_context
);
ID2D1Factory1_Release
(
factory
);
release_test_context
(
&
ctx
);
return
;
}
...
...
@@ -9542,7 +9538,7 @@ static void test_command_list(BOOL d3d11)
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
set_rect
(
&
rect
,
-
1
.
0
f
,
-
1
.
0
f
,
1
.
0
f
,
1
.
0
f
);
hr
=
ID2D1Factory1_CreateRectangleGeometry
(
factory
,
&
rect
,
(
ID2D1RectangleGeometry
**
)
&
geometry
);
hr
=
ID2D1Factory1_CreateRectangleGeometry
(
ctx
.
factory1
,
&
rect
,
(
ID2D1RectangleGeometry
**
)
&
geometry
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ID2D1RenderTarget_FillGeometry
(
rt
,
geometry
,
brush
,
NULL
);
...
...
@@ -9570,7 +9566,7 @@ static void test_command_list(BOOL d3d11)
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
set_rect
(
&
rect
,
-
1
.
0
f
,
-
1
.
0
f
,
1
.
0
f
,
1
.
0
f
);
hr
=
ID2D1Factory1_CreateRectangleGeometry
(
factory
,
&
rect
,
(
ID2D1RectangleGeometry
**
)
&
geometry
);
hr
=
ID2D1Factory1_CreateRectangleGeometry
(
ctx
.
factory1
,
&
rect
,
(
ID2D1RectangleGeometry
**
)
&
geometry
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ID2D1RenderTarget_FillGeometry
(
rt
,
geometry
,
brush
,
NULL
);
...
...
@@ -9586,7 +9582,7 @@ static void test_command_list(BOOL d3d11)
/* Geometry. */
set_rect
(
&
rect
,
-
1
.
0
f
,
-
1
.
0
f
,
1
.
0
f
,
1
.
0
f
);
hr
=
ID2D1Factory1_CreateRectangleGeometry
(
factory
,
&
rect
,
(
ID2D1RectangleGeometry
**
)
&
geometry
);
hr
=
ID2D1Factory1_CreateRectangleGeometry
(
ctx
.
factory1
,
&
rect
,
(
ID2D1RectangleGeometry
**
)
&
geometry
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
set_color
(
&
color
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
);
...
...
@@ -9610,7 +9606,7 @@ static void test_command_list(BOOL d3d11)
stroke_desc
.
dashStyle
=
D2D1_DASH_STYLE_DOT
;
stroke_desc
.
dashOffset
=
-
1
.
0
f
;
hr
=
ID2D1Factory_CreateStrokeStyle
((
ID2D1Factory
*
)
factory
,
&
stroke_desc
,
NULL
,
0
,
&
stroke_style
);
hr
=
ID2D1Factory_CreateStrokeStyle
((
ID2D1Factory
*
)
ctx
.
factory
,
&
stroke_desc
,
NULL
,
0
,
&
stroke_style
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
set_color
(
&
color
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
);
...
...
@@ -9653,7 +9649,7 @@ static void test_command_list(BOOL d3d11)
ID2D1CommandList_Release
(
command_list
);
/* List created with different context. */
device_context2
=
create_device_context
(
factory
,
ctx
.
device
,
d3d11
);
device_context2
=
create_device_context
(
ctx
.
factory1
,
ctx
.
device
,
d3d11
);
ok
(
device_context2
!=
NULL
,
"Failed to create device context.
\n
"
);
hr
=
ID2D1DeviceContext_CreateCommandList
(
device_context
,
&
command_list
);
...
...
@@ -9667,8 +9663,6 @@ static void test_command_list(BOOL d3d11)
ID2D1DeviceContext_Release
(
device_context2
);
ID2D1RenderTarget_Release
(
rt
);
ID2D1DeviceContext_Release
(
device_context
);
ID2D1Factory1_Release
(
factory
);
release_test_context
(
&
ctx
);
}
...
...
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