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
2f3738b3
Commit
2f3738b3
authored
Aug 06, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1/commandlist: Implement layer commands.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
a52ba8d9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
0 deletions
+73
-0
command_list.c
dlls/d2d1/command_list.c
+49
-0
d2d1_private.h
dlls/d2d1/d2d1_private.h
+3
-0
device.c
dlls/d2d1/device.c
+21
-0
No files found.
dlls/d2d1/command_list.c
View file @
2f3738b3
...
...
@@ -46,7 +46,9 @@ enum d2d_command_type
D2D_COMMAND_FILL_GEOMETRY
,
D2D_COMMAND_FILL_RECTANGLE
,
D2D_COMMAND_PUSH_CLIP
,
D2D_COMMAND_PUSH_LAYER
,
D2D_COMMAND_POP_CLIP
,
D2D_COMMAND_POP_LAYER
,
};
struct
d2d_command
...
...
@@ -110,6 +112,13 @@ struct d2d_command_push_clip
D2D1_ANTIALIAS_MODE
mode
;
};
struct
d2d_command_push_layer
{
struct
d2d_command
c
;
D2D1_LAYER_PARAMETERS1
params
;
ID2D1Layer
*
layer
;
};
struct
d2d_command_draw_line
{
struct
d2d_command
c
;
...
...
@@ -435,9 +444,18 @@ static HRESULT STDMETHODCALLTYPE d2d_command_list_Stream(ID2D1CommandList *iface
hr
=
ID2D1CommandSink_PushAxisAlignedClip
(
sink
,
&
c
->
rect
,
c
->
mode
);
break
;
}
case
D2D_COMMAND_PUSH_LAYER
:
{
const
struct
d2d_command_push_layer
*
c
=
data
;
hr
=
ID2D1CommandSink_PushLayer
(
sink
,
&
c
->
params
,
c
->
layer
);
break
;
}
case
D2D_COMMAND_POP_CLIP
:
hr
=
ID2D1CommandSink_PopAxisAlignedClip
(
sink
);
break
;
case
D2D_COMMAND_POP_LAYER
:
hr
=
ID2D1CommandSink_PopLayer
(
sink
);
break
;
default:
FIXME
(
"Unhandled command %u.
\n
"
,
command
->
op
);
hr
=
E_UNEXPECTED
;
...
...
@@ -694,6 +712,37 @@ void d2d_command_list_pop_clip(struct d2d_command_list *command_list)
command
->
op
=
D2D_COMMAND_POP_CLIP
;
}
void
d2d_command_list_push_layer
(
struct
d2d_command_list
*
command_list
,
const
struct
d2d_device_context
*
context
,
const
D2D1_LAYER_PARAMETERS1
*
params
,
ID2D1Layer
*
layer
)
{
struct
d2d_command_push_layer
*
command
;
ID2D1Brush
*
opacity_brush
=
NULL
;
if
(
params
->
opacityBrush
&&
FAILED
(
d2d_command_list_create_brush
(
command_list
,
context
,
params
->
opacityBrush
,
&
opacity_brush
)))
{
command_list
->
state
=
D2D_COMMAND_LIST_STATE_ERROR
;
return
;
}
d2d_command_list_reference_object
(
command_list
,
layer
);
d2d_command_list_reference_object
(
command_list
,
params
->
geometricMask
);
command
=
d2d_command_list_require_space
(
command_list
,
sizeof
(
*
command
));
command
->
c
.
op
=
D2D_COMMAND_PUSH_LAYER
;
command
->
params
=
*
params
;
command
->
params
.
opacityBrush
=
opacity_brush
;
command
->
layer
=
layer
;
}
void
d2d_command_list_pop_layer
(
struct
d2d_command_list
*
command_list
)
{
struct
d2d_command
*
command
;
command
=
d2d_command_list_require_space
(
command_list
,
sizeof
(
*
command
));
command
->
op
=
D2D_COMMAND_POP_LAYER
;
}
void
d2d_command_list_clear
(
struct
d2d_command_list
*
command_list
,
const
D2D1_COLOR_F
*
color
)
{
struct
d2d_command_clear
*
command
;
...
...
dlls/d2d1/d2d1_private.h
View file @
2f3738b3
...
...
@@ -776,6 +776,9 @@ void d2d_command_list_fill_mesh(struct d2d_command_list *command_list, const str
ID2D1Mesh
*
mesh
,
ID2D1Brush
*
orig_brush
)
DECLSPEC_HIDDEN
;
void
d2d_command_list_fill_opacity_mask
(
struct
d2d_command_list
*
command_list
,
const
struct
d2d_device_context
*
context
,
ID2D1Bitmap
*
bitmap
,
ID2D1Brush
*
orig_brush
,
const
D2D1_RECT_F
*
dst_rect
,
const
D2D1_RECT_F
*
src_rect
)
DECLSPEC_HIDDEN
;
void
d2d_command_list_push_layer
(
struct
d2d_command_list
*
command_list
,
const
struct
d2d_device_context
*
context
,
const
D2D1_LAYER_PARAMETERS1
*
params
,
ID2D1Layer
*
layer
)
DECLSPEC_HIDDEN
;
void
d2d_command_list_pop_layer
(
struct
d2d_command_list
*
command_list
)
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 @
2f3738b3
...
...
@@ -1696,12 +1696,28 @@ static void STDMETHODCALLTYPE d2d_device_context_GetTags(ID2D1DeviceContext1 *if
static
void
STDMETHODCALLTYPE
d2d_device_context_PushLayer
(
ID2D1DeviceContext1
*
iface
,
const
D2D1_LAYER_PARAMETERS
*
layer_parameters
,
ID2D1Layer
*
layer
)
{
struct
d2d_device_context
*
context
=
impl_from_ID2D1DeviceContext
(
iface
);
FIXME
(
"iface %p, layer_parameters %p, layer %p stub!
\n
"
,
iface
,
layer_parameters
,
layer
);
if
(
context
->
target
.
type
==
D2D_TARGET_COMMAND_LIST
)
{
D2D1_LAYER_PARAMETERS1
parameters
;
memcpy
(
&
parameters
,
layer_parameters
,
sizeof
(
*
layer_parameters
));
parameters
.
layerOptions
=
D2D1_LAYER_OPTIONS1_NONE
;
d2d_command_list_push_layer
(
context
->
target
.
command_list
,
context
,
&
parameters
,
layer
);
}
}
static
void
STDMETHODCALLTYPE
d2d_device_context_PopLayer
(
ID2D1DeviceContext1
*
iface
)
{
struct
d2d_device_context
*
context
=
impl_from_ID2D1DeviceContext
(
iface
);
FIXME
(
"iface %p stub!
\n
"
,
iface
);
if
(
context
->
target
.
type
==
D2D_TARGET_COMMAND_LIST
)
d2d_command_list_pop_layer
(
context
->
target
.
command_list
);
}
static
HRESULT
STDMETHODCALLTYPE
d2d_device_context_Flush
(
ID2D1DeviceContext1
*
iface
,
D2D1_TAG
*
tag1
,
D2D1_TAG
*
tag2
)
...
...
@@ -2564,7 +2580,12 @@ static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_DrawBitmap(I
static
void
STDMETHODCALLTYPE
d2d_device_context_ID2D1DeviceContext_PushLayer
(
ID2D1DeviceContext1
*
iface
,
const
D2D1_LAYER_PARAMETERS1
*
layer_parameters
,
ID2D1Layer
*
layer
)
{
struct
d2d_device_context
*
context
=
impl_from_ID2D1DeviceContext
(
iface
);
FIXME
(
"iface %p, layer_parameters %p, layer %p stub!
\n
"
,
iface
,
layer_parameters
,
layer
);
if
(
context
->
target
.
type
==
D2D_TARGET_COMMAND_LIST
)
d2d_command_list_push_layer
(
context
->
target
.
command_list
,
context
,
layer_parameters
,
layer
);
}
static
HRESULT
STDMETHODCALLTYPE
d2d_device_context_InvalidateEffectInputRectangle
(
ID2D1DeviceContext1
*
iface
,
...
...
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