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
91b9ce69
Commit
91b9ce69
authored
Aug 02, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Implement d2d_gradient_GetFactory().
parent
4e50527c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
brush.c
dlls/d2d1/brush.c
+7
-3
d2d1_private.h
dlls/d2d1/d2d1_private.h
+2
-1
render_target.c
dlls/d2d1/render_target.c
+2
-1
No files found.
dlls/d2d1/brush.c
View file @
91b9ce69
...
...
@@ -68,6 +68,7 @@ static ULONG STDMETHODCALLTYPE d2d_gradient_Release(ID2D1GradientStopCollection
if
(
!
refcount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
gradient
->
stops
);
ID2D1Factory_Release
(
gradient
->
factory
);
HeapFree
(
GetProcessHeap
(),
0
,
gradient
);
}
...
...
@@ -76,9 +77,11 @@ static ULONG STDMETHODCALLTYPE d2d_gradient_Release(ID2D1GradientStopCollection
static
void
STDMETHODCALLTYPE
d2d_gradient_GetFactory
(
ID2D1GradientStopCollection
*
iface
,
ID2D1Factory
**
factory
)
{
FIXME
(
"iface %p, factory %p stub!
\n
"
,
iface
,
factory
);
struct
d2d_gradient
*
gradient
=
impl_from_ID2D1GradientStopCollection
(
iface
);
TRACE
(
"iface %p, factory %p.
\n
"
,
iface
,
factory
);
*
factory
=
NULL
;
ID2D1Factory_AddRef
(
*
factory
=
gradient
->
factory
)
;
}
static
UINT32
STDMETHODCALLTYPE
d2d_gradient_GetGradientStopCount
(
ID2D1GradientStopCollection
*
iface
)
...
...
@@ -128,13 +131,14 @@ static const struct ID2D1GradientStopCollectionVtbl d2d_gradient_vtbl =
d2d_gradient_GetExtendMode
,
};
HRESULT
d2d_gradient_init
(
struct
d2d_gradient
*
gradient
,
ID2D1
RenderTarget
*
render_target
,
HRESULT
d2d_gradient_init
(
struct
d2d_gradient
*
gradient
,
ID2D1
Factory
*
factory
,
const
D2D1_GRADIENT_STOP
*
stops
,
UINT32
stop_count
,
D2D1_GAMMA
gamma
,
D2D1_EXTEND_MODE
extend_mode
)
{
FIXME
(
"Ignoring gradient properties.
\n
"
);
gradient
->
ID2D1GradientStopCollection_iface
.
lpVtbl
=
&
d2d_gradient_vtbl
;
gradient
->
refcount
=
1
;
ID2D1Factory_AddRef
(
gradient
->
factory
=
factory
);
gradient
->
stop_count
=
stop_count
;
if
(
!
(
gradient
->
stops
=
HeapAlloc
(
GetProcessHeap
(),
0
,
stop_count
*
sizeof
(
*
stops
))))
...
...
dlls/d2d1/d2d1_private.h
View file @
91b9ce69
...
...
@@ -112,11 +112,12 @@ struct d2d_gradient
ID2D1GradientStopCollection
ID2D1GradientStopCollection_iface
;
LONG
refcount
;
ID2D1Factory
*
factory
;
D2D1_GRADIENT_STOP
*
stops
;
UINT32
stop_count
;
};
HRESULT
d2d_gradient_init
(
struct
d2d_gradient
*
gradient
,
ID2D1
RenderTarget
*
render_target
,
HRESULT
d2d_gradient_init
(
struct
d2d_gradient
*
gradient
,
ID2D1
Factory
*
factory
,
const
D2D1_GRADIENT_STOP
*
stops
,
UINT32
stop_count
,
D2D1_GAMMA
gamma
,
D2D1_EXTEND_MODE
extend_mode
)
DECLSPEC_HIDDEN
;
...
...
dlls/d2d1/render_target.c
View file @
91b9ce69
...
...
@@ -462,6 +462,7 @@ static HRESULT STDMETHODCALLTYPE d2d_d3d_render_target_CreateGradientStopCollect
const
D2D1_GRADIENT_STOP
*
stops
,
UINT32
stop_count
,
D2D1_GAMMA
gamma
,
D2D1_EXTEND_MODE
extend_mode
,
ID2D1GradientStopCollection
**
gradient
)
{
struct
d2d_d3d_render_target
*
render_target
=
impl_from_ID2D1RenderTarget
(
iface
);
struct
d2d_gradient
*
object
;
HRESULT
hr
;
...
...
@@ -471,7 +472,7 @@ static HRESULT STDMETHODCALLTYPE d2d_d3d_render_target_CreateGradientStopCollect
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
d2d_gradient_init
(
object
,
iface
,
stops
,
stop_count
,
gamma
,
extend_mode
)))
if
(
FAILED
(
hr
=
d2d_gradient_init
(
object
,
render_target
->
factory
,
stops
,
stop_count
,
gamma
,
extend_mode
)))
{
WARN
(
"Failed to initialize gradient, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
...
...
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