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
5295edbd
Commit
5295edbd
authored
Sep 03, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Implement d2d_d3d_render_target_GetPixelSize().
parent
53d0c205
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
6 deletions
+26
-6
d2d1_private.h
dlls/d2d1/d2d1_private.h
+2
-1
factory.c
dlls/d2d1/factory.c
+7
-1
render_target.c
dlls/d2d1/render_target.c
+17
-4
No files found.
dlls/d2d1/d2d1_private.h
View file @
5295edbd
...
...
@@ -29,10 +29,11 @@ struct d2d_d3d_render_target
ID2D1RenderTarget
ID2D1RenderTarget_iface
;
LONG
refcount
;
D2D1_SIZE_U
pixel_size
;
D2D1_MATRIX_3X2_F
transform
;
};
void
d2d_d3d_render_target_init
(
struct
d2d_d3d_render_target
*
render_target
,
ID2D1Factory
*
factory
,
HRESULT
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
...
...
dlls/d2d1/factory.c
View file @
5295edbd
...
...
@@ -191,13 +191,19 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1
IDXGISurface
*
surface
,
const
D2D1_RENDER_TARGET_PROPERTIES
*
desc
,
ID2D1RenderTarget
**
render_target
)
{
struct
d2d_d3d_render_target
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, surface %p, desc %p, render_target %p.
\n
"
,
iface
,
surface
,
desc
,
render_target
);
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
d2d_d3d_render_target_init
(
object
,
iface
,
surface
,
desc
);
if
(
FAILED
(
hr
=
d2d_d3d_render_target_init
(
object
,
iface
,
surface
,
desc
)))
{
WARN
(
"Failed to initialize render target, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created render target %p.
\n
"
,
object
);
*
render_target
=
&
object
->
ID2D1RenderTarget_iface
;
...
...
dlls/d2d1/render_target.c
View file @
5295edbd
...
...
@@ -483,11 +483,11 @@ static D2D1_SIZE_F STDMETHODCALLTYPE d2d_d3d_render_target_GetSize(ID2D1RenderTa
static
D2D1_SIZE_U
STDMETHODCALLTYPE
d2d_d3d_render_target_GetPixelSize
(
ID2D1RenderTarget
*
iface
)
{
st
atic
const
D2D1_SIZE_U
size
=
{
0
,
0
}
;
st
ruct
d2d_d3d_render_target
*
render_target
=
impl_from_ID2D1RenderTarget
(
iface
)
;
FIXME
(
"iface %p stub!
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
size
;
return
render_target
->
pixel_
size
;
}
static
UINT32
STDMETHODCALLTYPE
d2d_d3d_render_target_GetMaximumBitmapSize
(
ID2D1RenderTarget
*
iface
)
...
...
@@ -566,9 +566,12 @@ static const struct ID2D1RenderTargetVtbl d2d_d3d_render_target_vtbl =
d2d_d3d_render_target_IsSupported
,
};
void
d2d_d3d_render_target_init
(
struct
d2d_d3d_render_target
*
render_target
,
ID2D1Factory
*
factory
,
HRESULT
d2d_d3d_render_target_init
(
struct
d2d_d3d_render_target
*
render_target
,
ID2D1Factory
*
factory
,
IDXGISurface
*
surface
,
const
D2D1_RENDER_TARGET_PROPERTIES
*
desc
)
{
DXGI_SURFACE_DESC
surface_desc
;
HRESULT
hr
;
static
const
D2D1_MATRIX_3X2_F
identity
=
{
1
.
0
f
,
0
.
0
f
,
...
...
@@ -581,5 +584,15 @@ void d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_target, ID2
render_target
->
ID2D1RenderTarget_iface
.
lpVtbl
=
&
d2d_d3d_render_target_vtbl
;
render_target
->
refcount
=
1
;
if
(
FAILED
(
hr
=
IDXGISurface_GetDesc
(
surface
,
&
surface_desc
)))
{
WARN
(
"Failed to get surface desc, hr %#x.
\n
"
,
hr
);
return
hr
;
}
render_target
->
pixel_size
.
width
=
surface_desc
.
Width
;
render_target
->
pixel_size
.
height
=
surface_desc
.
Height
;
render_target
->
transform
=
identity
;
return
S_OK
;
}
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