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
ccfdeec3
Commit
ccfdeec3
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 Clear() command.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
eba21e75
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
command_list.c
dlls/d2d1/command_list.c
+23
-0
d2d1_private.h
dlls/d2d1/d2d1_private.h
+1
-0
device.c
dlls/d2d1/device.c
+1
-1
No files found.
dlls/d2d1/command_list.c
View file @
ccfdeec3
...
...
@@ -28,6 +28,7 @@ enum d2d_command_type
D2D_COMMAND_SET_TRANSFORM
,
D2D_COMMAND_SET_PRIMITIVE_BLEND
,
D2D_COMMAND_SET_UNIT_MODE
,
D2D_COMMAND_CLEAR
,
D2D_COMMAND_PUSH_CLIP
,
D2D_COMMAND_POP_CLIP
,
};
...
...
@@ -74,6 +75,12 @@ struct d2d_command_set_unit_mode
D2D1_UNIT_MODE
mode
;
};
struct
d2d_command_clear
{
struct
d2d_command
c
;
D2D1_COLOR_F
color
;
};
struct
d2d_command_push_clip
{
struct
d2d_command
c
;
...
...
@@ -199,6 +206,12 @@ static HRESULT STDMETHODCALLTYPE d2d_command_list_Stream(ID2D1CommandList *iface
hr
=
ID2D1CommandSink_SetUnitMode
(
sink
,
c
->
mode
);
break
;
}
case
D2D_COMMAND_CLEAR
:
{
const
struct
d2d_command_clear
*
c
=
data
;
hr
=
ID2D1CommandSink_Clear
(
sink
,
&
c
->
color
);
break
;
}
case
D2D_COMMAND_PUSH_CLIP
:
{
const
struct
d2d_command_push_clip
*
c
=
data
;
...
...
@@ -380,3 +393,13 @@ void d2d_command_list_pop_clip(struct d2d_command_list *command_list)
command
=
d2d_command_list_require_space
(
command_list
,
sizeof
(
*
command
));
command
->
op
=
D2D_COMMAND_POP_CLIP
;
}
void
d2d_command_list_clear
(
struct
d2d_command_list
*
command_list
,
const
D2D1_COLOR_F
*
color
)
{
struct
d2d_command_clear
*
command
;
command
=
d2d_command_list_require_space
(
command_list
,
sizeof
(
*
command
));
command
->
c
.
op
=
D2D_COMMAND_CLEAR
;
if
(
color
)
command
->
color
=
*
color
;
else
memset
(
&
command
->
color
,
0
,
sizeof
(
command
->
color
));
}
dlls/d2d1/d2d1_private.h
View file @
ccfdeec3
...
...
@@ -741,6 +741,7 @@ void d2d_command_list_set_transform(struct d2d_command_list *command_list,
void
d2d_command_list_push_clip
(
struct
d2d_command_list
*
command_list
,
const
D2D1_RECT_F
*
rect
,
D2D1_ANTIALIAS_MODE
antialias_mode
)
DECLSPEC_HIDDEN
;
void
d2d_command_list_pop_clip
(
struct
d2d_command_list
*
command_list
)
DECLSPEC_HIDDEN
;
void
d2d_command_list_clear
(
struct
d2d_command_list
*
command_list
,
const
D2D1_COLOR_F
*
color
)
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 @
ccfdeec3
...
...
@@ -1703,7 +1703,7 @@ static void STDMETHODCALLTYPE d2d_device_context_Clear(ID2D1DeviceContext1 *ifac
if
(
context
->
target
.
type
==
D2D_TARGET_COMMAND_LIST
)
{
FIXME
(
"Unimplemented for command list target.
\n
"
);
d2d_command_list_clear
(
context
->
target
.
command_list
,
colour
);
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