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
22a20e40
Commit
22a20e40
authored
Jun 16, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Implement d2d_d3d_render_target_CreateGradientStopCollection().
parent
cfde8331
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
125 additions
and
2 deletions
+125
-2
brush.c
dlls/d2d1/brush.c
+103
-0
d2d1_private.h
dlls/d2d1/d2d1_private.h
+10
-0
render_target.c
dlls/d2d1/render_target.c
+12
-2
No files found.
dlls/d2d1/brush.c
View file @
22a20e40
...
@@ -23,6 +23,109 @@
...
@@ -23,6 +23,109 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d2d
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d2d
);
static
inline
struct
d2d_gradient
*
impl_from_ID2D1GradientStopCollection
(
ID2D1GradientStopCollection
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d2d_gradient
,
ID2D1GradientStopCollection_iface
);
}
static
HRESULT
STDMETHODCALLTYPE
d2d_gradient_QueryInterface
(
ID2D1GradientStopCollection
*
iface
,
REFIID
iid
,
void
**
out
)
{
TRACE
(
"iface %p, iid %s, out %p.
\n
"
,
iface
,
debugstr_guid
(
iid
),
out
);
if
(
IsEqualGUID
(
iid
,
&
IID_ID2D1GradientStopCollection
)
||
IsEqualGUID
(
iid
,
&
IID_ID2D1Resource
)
||
IsEqualGUID
(
iid
,
&
IID_IUnknown
))
{
ID2D1GradientStopCollection_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_gradient_AddRef
(
ID2D1GradientStopCollection
*
iface
)
{
struct
d2d_gradient
*
gradient
=
impl_from_ID2D1GradientStopCollection
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
gradient
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
refcount
);
return
refcount
;
}
static
ULONG
STDMETHODCALLTYPE
d2d_gradient_Release
(
ID2D1GradientStopCollection
*
iface
)
{
struct
d2d_gradient
*
gradient
=
impl_from_ID2D1GradientStopCollection
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
gradient
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
iface
,
refcount
);
if
(
!
refcount
)
HeapFree
(
GetProcessHeap
(),
0
,
gradient
);
return
refcount
;
}
static
void
STDMETHODCALLTYPE
d2d_gradient_GetFactory
(
ID2D1GradientStopCollection
*
iface
,
ID2D1Factory
**
factory
)
{
FIXME
(
"iface %p, factory %p stub!
\n
"
,
iface
,
factory
);
*
factory
=
NULL
;
}
static
UINT32
STDMETHODCALLTYPE
d2d_gradient_GetGradientStopCount
(
ID2D1GradientStopCollection
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
0
;
}
static
void
STDMETHODCALLTYPE
d2d_gradient_GetGradientStops
(
ID2D1GradientStopCollection
*
iface
,
D2D1_GRADIENT_STOP
*
stops
,
UINT32
stop_count
)
{
FIXME
(
"iface %p, stops %p, stop_count %u stub!
\n
"
,
iface
,
stops
,
stop_count
);
}
static
D2D1_GAMMA
STDMETHODCALLTYPE
d2d_gradient_GetColorInterpolationGamma
(
ID2D1GradientStopCollection
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
D2D1_GAMMA_1_0
;
}
static
D2D1_EXTEND_MODE
STDMETHODCALLTYPE
d2d_gradient_GetExtendMode
(
ID2D1GradientStopCollection
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
D2D1_EXTEND_MODE_CLAMP
;
}
static
const
struct
ID2D1GradientStopCollectionVtbl
d2d_gradient_vtbl
=
{
d2d_gradient_QueryInterface
,
d2d_gradient_AddRef
,
d2d_gradient_Release
,
d2d_gradient_GetFactory
,
d2d_gradient_GetGradientStopCount
,
d2d_gradient_GetGradientStops
,
d2d_gradient_GetColorInterpolationGamma
,
d2d_gradient_GetExtendMode
,
};
void
d2d_gradient_init
(
struct
d2d_gradient
*
gradient
,
ID2D1RenderTarget
*
render_target
,
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
;
}
static
inline
struct
d2d_brush
*
impl_from_ID2D1SolidColorBrush
(
ID2D1SolidColorBrush
*
iface
)
static
inline
struct
d2d_brush
*
impl_from_ID2D1SolidColorBrush
(
ID2D1SolidColorBrush
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
struct
d2d_brush
,
ID2D1Brush_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
d2d_brush
,
ID2D1Brush_iface
);
...
...
dlls/d2d1/d2d1_private.h
View file @
22a20e40
...
@@ -33,6 +33,16 @@ struct d2d_d3d_render_target
...
@@ -33,6 +33,16 @@ struct d2d_d3d_render_target
void
d2d_d3d_render_target_init
(
struct
d2d_d3d_render_target
*
render_target
,
ID2D1Factory
*
factory
,
void
d2d_d3d_render_target_init
(
struct
d2d_d3d_render_target
*
render_target
,
ID2D1Factory
*
factory
,
IDXGISurface
*
surface
,
const
D2D1_RENDER_TARGET_PROPERTIES
*
desc
)
DECLSPEC_HIDDEN
;
IDXGISurface
*
surface
,
const
D2D1_RENDER_TARGET_PROPERTIES
*
desc
)
DECLSPEC_HIDDEN
;
struct
d2d_gradient
{
ID2D1GradientStopCollection
ID2D1GradientStopCollection_iface
;
LONG
refcount
;
};
void
d2d_gradient_init
(
struct
d2d_gradient
*
gradient
,
ID2D1RenderTarget
*
render_target
,
const
D2D1_GRADIENT_STOP
*
stops
,
UINT32
stop_count
,
D2D1_GAMMA
gamma
,
D2D1_EXTEND_MODE
extend_mode
)
DECLSPEC_HIDDEN
;
struct
d2d_brush
struct
d2d_brush
{
{
ID2D1Brush
ID2D1Brush_iface
;
ID2D1Brush
ID2D1Brush_iface
;
...
...
dlls/d2d1/render_target.c
View file @
22a20e40
...
@@ -136,10 +136,20 @@ static HRESULT STDMETHODCALLTYPE d2d_d3d_render_target_CreateGradientStopCollect
...
@@ -136,10 +136,20 @@ static HRESULT STDMETHODCALLTYPE d2d_d3d_render_target_CreateGradientStopCollect
const
D2D1_GRADIENT_STOP
*
stops
,
UINT32
stop_count
,
D2D1_GAMMA
gamma
,
D2D1_EXTEND_MODE
extend_mode
,
const
D2D1_GRADIENT_STOP
*
stops
,
UINT32
stop_count
,
D2D1_GAMMA
gamma
,
D2D1_EXTEND_MODE
extend_mode
,
ID2D1GradientStopCollection
**
gradient
)
ID2D1GradientStopCollection
**
gradient
)
{
{
FIXME
(
"iface %p, stops %p, stop_count %u, gamma %#x, extend_mode %#x, gradient %p stub!
\n
"
,
struct
d2d_gradient
*
object
;
TRACE
(
"iface %p, stops %p, stop_count %u, gamma %#x, extend_mode %#x, gradient %p.
\n
"
,
iface
,
stops
,
stop_count
,
gamma
,
extend_mode
,
gradient
);
iface
,
stops
,
stop_count
,
gamma
,
extend_mode
,
gradient
);
return
E_NOTIMPL
;
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
d2d_gradient_init
(
object
,
iface
,
stops
,
stop_count
,
gamma
,
extend_mode
);
TRACE
(
"Created gradient %p.
\n
"
,
object
);
*
gradient
=
&
object
->
ID2D1GradientStopCollection_iface
;
return
S_OK
;
}
}
static
HRESULT
STDMETHODCALLTYPE
d2d_d3d_render_target_CreateLinearGradientBrush
(
ID2D1RenderTarget
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d2d_d3d_render_target_CreateLinearGradientBrush
(
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