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
3ec96c9b
Commit
3ec96c9b
authored
Aug 01, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1/commandlist: Implement DrawGeometry() command.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
ffe196ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletion
+45
-1
command_list.c
dlls/d2d1/command_list.c
+40
-0
d2d1_private.h
dlls/d2d1/d2d1_private.h
+3
-0
device.c
dlls/d2d1/device.c
+2
-1
No files found.
dlls/d2d1/command_list.c
View file @
3ec96c9b
...
...
@@ -30,6 +30,7 @@ enum d2d_command_type
D2D_COMMAND_SET_UNIT_MODE
,
D2D_COMMAND_CLEAR
,
D2D_COMMAND_DRAW_LINE
,
D2D_COMMAND_DRAW_GEOMETRY
,
D2D_COMMAND_PUSH_CLIP
,
D2D_COMMAND_POP_CLIP
,
};
...
...
@@ -98,6 +99,15 @@ struct d2d_command_draw_line
ID2D1StrokeStyle
*
stroke_style
;
};
struct
d2d_command_draw_geometry
{
struct
d2d_command
c
;
ID2D1Geometry
*
geometry
;
ID2D1Brush
*
brush
;
float
stroke_width
;
ID2D1StrokeStyle
*
stroke_style
;
};
static
inline
struct
d2d_command_list
*
impl_from_ID2D1CommandList
(
ID2D1CommandList
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d2d_command_list
,
ID2D1CommandList_iface
);
...
...
@@ -233,6 +243,13 @@ static HRESULT STDMETHODCALLTYPE d2d_command_list_Stream(ID2D1CommandList *iface
c
->
stroke_style
);
break
;
}
case
D2D_COMMAND_DRAW_GEOMETRY
:
{
const
struct
d2d_command_draw_geometry
*
c
=
data
;
hr
=
ID2D1CommandSink_DrawGeometry
(
sink
,
c
->
geometry
,
c
->
brush
,
c
->
stroke_width
,
c
->
stroke_style
);
break
;
}
case
D2D_COMMAND_PUSH_CLIP
:
{
const
struct
d2d_command_push_clip
*
c
=
data
;
...
...
@@ -530,3 +547,26 @@ void d2d_command_list_draw_line(struct d2d_command_list *command_list,
command
->
stroke_width
=
stroke_width
;
command
->
stroke_style
=
stroke_style
;
}
void
d2d_command_list_draw_geometry
(
struct
d2d_command_list
*
command_list
,
const
struct
d2d_device_context
*
context
,
ID2D1Geometry
*
geometry
,
ID2D1Brush
*
orig_brush
,
float
stroke_width
,
ID2D1StrokeStyle
*
stroke_style
)
{
struct
d2d_command_draw_geometry
*
command
;
ID2D1Brush
*
brush
;
if
(
FAILED
(
d2d_command_list_create_brush
(
command_list
,
context
,
orig_brush
,
&
brush
)))
{
command_list
->
state
=
D2D_COMMAND_LIST_STATE_ERROR
;
return
;
}
d2d_command_list_reference_object
(
command_list
,
geometry
);
d2d_command_list_reference_object
(
command_list
,
stroke_style
);
command
=
d2d_command_list_require_space
(
command_list
,
sizeof
(
*
command
));
command
->
c
.
op
=
D2D_COMMAND_DRAW_GEOMETRY
;
command
->
brush
=
brush
;
command
->
stroke_width
=
stroke_width
;
command
->
stroke_style
=
stroke_style
;
}
dlls/d2d1/d2d1_private.h
View file @
3ec96c9b
...
...
@@ -749,6 +749,9 @@ void d2d_command_list_clear(struct d2d_command_list *command_list, const D2D1_CO
void
d2d_command_list_draw_line
(
struct
d2d_command_list
*
command_list
,
const
struct
d2d_device_context
*
context
,
D2D1_POINT_2F
p0
,
D2D1_POINT_2F
p1
,
ID2D1Brush
*
orig_brush
,
float
stroke_width
,
ID2D1StrokeStyle
*
stroke_style
)
DECLSPEC_HIDDEN
;
void
d2d_command_list_draw_geometry
(
struct
d2d_command_list
*
command_list
,
const
struct
d2d_device_context
*
context
,
ID2D1Geometry
*
geometry
,
ID2D1Brush
*
orig_brush
,
float
stroke_width
,
ID2D1StrokeStyle
*
stroke_style
)
DECLSPEC_HIDDEN
;
static
inline
BOOL
d2d_array_reserve
(
void
**
elements
,
size_t
*
capacity
,
size_t
count
,
size_t
size
)
{
...
...
dlls/d2d1/device.c
View file @
3ec96c9b
...
...
@@ -950,7 +950,8 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawGeometry(ID2D1DeviceContext
if
(
context
->
target
.
type
==
D2D_TARGET_COMMAND_LIST
)
{
FIXME
(
"Unimplemented for command list target.
\n
"
);
d2d_command_list_draw_geometry
(
context
->
target
.
command_list
,
context
,
geometry
,
brush
,
stroke_width
,
stroke_style
);
return
;
}
...
...
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