Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
22a20e40
Commit
22a20e40
authored
10 years ago
by
Henri Verbeet
Committed by
Alexandre Julliard
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d2d1: Implement d2d_d3d_render_target_CreateGradientStopCollection().
parent
cfde8331
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/d2d1/brush.c
+103
-0
103 additions, 0 deletions
dlls/d2d1/brush.c
dlls/d2d1/d2d1_private.h
+10
-0
10 additions, 0 deletions
dlls/d2d1/d2d1_private.h
dlls/d2d1/render_target.c
+12
-2
12 additions, 2 deletions
dlls/d2d1/render_target.c
with
125 additions
and
2 deletions
dlls/d2d1/brush.c
+
103
−
0
View file @
22a20e40
...
...
@@ -23,6 +23,109 @@
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
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d2d_brush
,
ID2D1Brush_iface
);
...
...
This diff is collapsed.
Click to expand it.
dlls/d2d1/d2d1_private.h
+
10
−
0
View file @
22a20e40
...
...
@@ -33,6 +33,16 @@ struct d2d_d3d_render_target
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
;
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
{
ID2D1Brush
ID2D1Brush_iface
;
...
...
This diff is collapsed.
Click to expand it.
dlls/d2d1/render_target.c
+
12
−
2
View file @
22a20e40
...
...
@@ -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
,
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
);
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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment