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
be415203
Commit
be415203
authored
Sep 16, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Implement d2d_d3d_render_target_CreateMesh().
parent
c5af3d91
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
121 additions
and
2 deletions
+121
-2
Makefile.in
dlls/d2d1/Makefile.in
+1
-0
d2d1_private.h
dlls/d2d1/d2d1_private.h
+8
-0
mesh.c
dlls/d2d1/mesh.c
+100
-0
render_target.c
dlls/d2d1/render_target.c
+12
-2
No files found.
dlls/d2d1/Makefile.in
View file @
be415203
...
...
@@ -5,6 +5,7 @@ IMPORTS = d3d10_1 dxguid uuid
C_SRCS
=
\
brush.c
\
factory.c
\
mesh.c
\
render_target.c
\
stroke.c
\
wic_render_target.c
...
...
dlls/d2d1/d2d1_private.h
View file @
be415203
...
...
@@ -107,4 +107,12 @@ struct d2d_stroke_style
void
d2d_stroke_style_init
(
struct
d2d_stroke_style
*
style
,
ID2D1Factory
*
factory
,
const
D2D1_STROKE_STYLE_PROPERTIES
*
desc
,
const
float
*
dashes
,
UINT32
dash_count
)
DECLSPEC_HIDDEN
;
struct
d2d_mesh
{
ID2D1Mesh
ID2D1Mesh_iface
;
LONG
refcount
;
};
void
d2d_mesh_init
(
struct
d2d_mesh
*
mesh
)
DECLSPEC_HIDDEN
;
#endif
/* __WINE_D2D1_PRIVATE_H */
dlls/d2d1/mesh.c
0 → 100644
View file @
be415203
/*
* Copyright 2014 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include "d2d1_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d2d
);
static
inline
struct
d2d_mesh
*
impl_from_ID2D1Mesh
(
ID2D1Mesh
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d2d_mesh
,
ID2D1Mesh_iface
);
}
static
HRESULT
STDMETHODCALLTYPE
d2d_mesh_QueryInterface
(
ID2D1Mesh
*
iface
,
REFIID
iid
,
void
**
out
)
{
TRACE
(
"iface %p, iid %s, out %p.
\n
"
,
iface
,
debugstr_guid
(
iid
),
out
);
if
(
IsEqualGUID
(
iid
,
&
IID_ID2D1Mesh
)
||
IsEqualGUID
(
iid
,
&
IID_ID2D1Resource
)
||
IsEqualGUID
(
iid
,
&
IID_IUnknown
))
{
ID2D1Mesh_AddRef
(
iface
);
*
out
=
iface
;
return
S_OK
;
}
WARN
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
));
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
STDMETHODCALLTYPE
d2d_mesh_AddRef
(
ID2D1Mesh
*
iface
)
{
struct
d2d_mesh
*
mesh
=
impl_from_ID2D1Mesh
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
mesh
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
refcount
);
return
refcount
;
}
static
ULONG
STDMETHODCALLTYPE
d2d_mesh_Release
(
ID2D1Mesh
*
iface
)
{
struct
d2d_mesh
*
mesh
=
impl_from_ID2D1Mesh
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
mesh
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
iface
,
refcount
);
if
(
!
refcount
)
HeapFree
(
GetProcessHeap
(),
0
,
mesh
);
return
refcount
;
}
static
void
STDMETHODCALLTYPE
d2d_mesh_GetFactory
(
ID2D1Mesh
*
iface
,
ID2D1Factory
**
factory
)
{
FIXME
(
"iface %p, factory %p stub!
\n
"
,
iface
,
factory
);
*
factory
=
NULL
;
}
static
HRESULT
STDMETHODCALLTYPE
d2d_mesh_Open
(
ID2D1Mesh
*
iface
,
ID2D1TessellationSink
**
sink
)
{
FIXME
(
"iface %p, sink %p stub!
\n
"
,
iface
,
sink
);
return
E_NOTIMPL
;
}
static
const
struct
ID2D1MeshVtbl
d2d_mesh_vtbl
=
{
d2d_mesh_QueryInterface
,
d2d_mesh_AddRef
,
d2d_mesh_Release
,
d2d_mesh_GetFactory
,
d2d_mesh_Open
,
};
void
d2d_mesh_init
(
struct
d2d_mesh
*
mesh
)
{
mesh
->
ID2D1Mesh_iface
.
lpVtbl
=
&
d2d_mesh_vtbl
;
mesh
->
refcount
=
1
;
}
dlls/d2d1/render_target.c
View file @
be415203
...
...
@@ -304,9 +304,19 @@ static HRESULT STDMETHODCALLTYPE d2d_d3d_render_target_CreateLayer(ID2D1RenderTa
static
HRESULT
STDMETHODCALLTYPE
d2d_d3d_render_target_CreateMesh
(
ID2D1RenderTarget
*
iface
,
ID2D1Mesh
**
mesh
)
{
FIXME
(
"iface %p, mesh %p stub!
\n
"
,
iface
,
mesh
)
;
struct
d2d_mesh
*
object
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, mesh %p.
\n
"
,
iface
,
mesh
);
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
d2d_mesh_init
(
object
);
TRACE
(
"Created mesh %p.
\n
"
,
object
);
*
mesh
=
&
object
->
ID2D1Mesh_iface
;
return
S_OK
;
}
static
void
STDMETHODCALLTYPE
d2d_d3d_render_target_DrawLine
(
ID2D1RenderTarget
*
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