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
14c0009a
Commit
14c0009a
authored
Jul 31, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Implement d2d_path_geometry_GetFactory().
parent
9745efaf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
d2d1_private.h
dlls/d2d1/d2d1_private.h
+5
-2
factory.c
dlls/d2d1/factory.c
+2
-2
geometry.c
dlls/d2d1/geometry.c
+12
-7
No files found.
dlls/d2d1/d2d1_private.h
View file @
14c0009a
...
...
@@ -242,6 +242,8 @@ struct d2d_geometry
ID2D1Geometry
ID2D1Geometry_iface
;
LONG
refcount
;
ID2D1Factory
*
factory
;
D2D1_POINT_2F
*
vertices
;
size_t
vertex_count
;
...
...
@@ -273,8 +275,9 @@ struct d2d_geometry
}
u
;
};
void
d2d_path_geometry_init
(
struct
d2d_geometry
*
geometry
)
DECLSPEC_HIDDEN
;
HRESULT
d2d_rectangle_geometry_init
(
struct
d2d_geometry
*
geometry
,
const
D2D1_RECT_F
*
rect
)
DECLSPEC_HIDDEN
;
void
d2d_path_geometry_init
(
struct
d2d_geometry
*
geometry
,
ID2D1Factory
*
factory
)
DECLSPEC_HIDDEN
;
HRESULT
d2d_rectangle_geometry_init
(
struct
d2d_geometry
*
geometry
,
ID2D1Factory
*
factory
,
const
D2D1_RECT_F
*
rect
)
DECLSPEC_HIDDEN
;
struct
d2d_geometry
*
unsafe_impl_from_ID2D1Geometry
(
ID2D1Geometry
*
iface
)
DECLSPEC_HIDDEN
;
static
inline
void
d2d_matrix_multiply
(
D2D_MATRIX_3X2_F
*
a
,
const
D2D_MATRIX_3X2_F
*
b
)
...
...
dlls/d2d1/factory.c
View file @
14c0009a
...
...
@@ -102,7 +102,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
d2d_rectangle_geometry_init
(
object
,
rect
)))
if
(
FAILED
(
hr
=
d2d_rectangle_geometry_init
(
object
,
iface
,
rect
)))
{
WARN
(
"Failed to initialize rectangle geometry, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
...
...
@@ -159,7 +159,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory *if
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
d2d_path_geometry_init
(
object
);
d2d_path_geometry_init
(
object
,
iface
);
TRACE
(
"Created path geometry %p.
\n
"
,
object
);
*
geometry
=
(
ID2D1PathGeometry
*
)
&
object
->
ID2D1Geometry_iface
;
...
...
dlls/d2d1/geometry.c
View file @
14c0009a
...
...
@@ -982,13 +982,16 @@ static void d2d_geometry_destroy(struct d2d_geometry *geometry)
HeapFree
(
GetProcessHeap
(),
0
,
geometry
->
beziers
);
HeapFree
(
GetProcessHeap
(),
0
,
geometry
->
faces
);
HeapFree
(
GetProcessHeap
(),
0
,
geometry
->
vertices
);
ID2D1Factory_Release
(
geometry
->
factory
);
HeapFree
(
GetProcessHeap
(),
0
,
geometry
);
}
static
void
d2d_geometry_init
(
struct
d2d_geometry
*
geometry
,
const
struct
ID2D1GeometryVtbl
*
vtbl
)
static
void
d2d_geometry_init
(
struct
d2d_geometry
*
geometry
,
ID2D1Factory
*
factory
,
const
struct
ID2D1GeometryVtbl
*
vtbl
)
{
geometry
->
ID2D1Geometry_iface
.
lpVtbl
=
vtbl
;
geometry
->
refcount
=
1
;
ID2D1Factory_AddRef
(
geometry
->
factory
=
factory
);
}
static
inline
struct
d2d_geometry
*
impl_from_ID2D1GeometrySink
(
ID2D1GeometrySink
*
iface
)
...
...
@@ -1368,9 +1371,11 @@ static ULONG STDMETHODCALLTYPE d2d_path_geometry_Release(ID2D1PathGeometry *ifac
static
void
STDMETHODCALLTYPE
d2d_path_geometry_GetFactory
(
ID2D1PathGeometry
*
iface
,
ID2D1Factory
**
factory
)
{
FIXME
(
"iface %p, factory %p stub!
\n
"
,
iface
,
factory
);
struct
d2d_geometry
*
geometry
=
impl_from_ID2D1PathGeometry
(
iface
);
*
factory
=
NULL
;
TRACE
(
"iface %p, factory %p.
\n
"
,
iface
,
factory
);
ID2D1Factory_AddRef
(
*
factory
=
geometry
->
factory
);
}
static
HRESULT
STDMETHODCALLTYPE
d2d_path_geometry_GetBounds
(
ID2D1PathGeometry
*
iface
,
...
...
@@ -1567,9 +1572,9 @@ static const struct ID2D1PathGeometryVtbl d2d_path_geometry_vtbl =
d2d_path_geometry_GetFigureCount
,
};
void
d2d_path_geometry_init
(
struct
d2d_geometry
*
geometry
)
void
d2d_path_geometry_init
(
struct
d2d_geometry
*
geometry
,
ID2D1Factory
*
factory
)
{
d2d_geometry_init
(
geometry
,
(
ID2D1GeometryVtbl
*
)
&
d2d_path_geometry_vtbl
);
d2d_geometry_init
(
geometry
,
factory
,
(
ID2D1GeometryVtbl
*
)
&
d2d_path_geometry_vtbl
);
geometry
->
u
.
path
.
ID2D1GeometrySink_iface
.
lpVtbl
=
&
d2d_geometry_sink_vtbl
;
}
...
...
@@ -1779,9 +1784,9 @@ static const struct ID2D1RectangleGeometryVtbl d2d_rectangle_geometry_vtbl =
d2d_rectangle_geometry_GetRect
,
};
HRESULT
d2d_rectangle_geometry_init
(
struct
d2d_geometry
*
geometry
,
const
D2D1_RECT_F
*
rect
)
HRESULT
d2d_rectangle_geometry_init
(
struct
d2d_geometry
*
geometry
,
ID2D1Factory
*
factory
,
const
D2D1_RECT_F
*
rect
)
{
d2d_geometry_init
(
geometry
,
(
ID2D1GeometryVtbl
*
)
&
d2d_rectangle_geometry_vtbl
);
d2d_geometry_init
(
geometry
,
factory
,
(
ID2D1GeometryVtbl
*
)
&
d2d_rectangle_geometry_vtbl
);
geometry
->
u
.
rectangle
.
rect
=
*
rect
;
if
(
!
(
geometry
->
vertices
=
HeapAlloc
(
GetProcessHeap
(),
0
,
4
*
sizeof
(
*
geometry
->
vertices
))))
...
...
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