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
4e29ade6
Commit
4e29ade6
authored
Dec 07, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Add a separate function for surface initialization.
parent
89c96ca3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
16 deletions
+21
-16
device.c
dlls/dxgi/device.c
+7
-12
dxgi_private.h
dlls/dxgi/dxgi_private.h
+2
-2
surface.c
dlls/dxgi/surface.c
+12
-2
No files found.
dlls/dxgi/device.c
View file @
4e29ade6
...
...
@@ -262,6 +262,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *ifa
DXGI_USAGE
usage
,
const
DXGI_SHARED_RESOURCE
*
shared_resource
,
IUnknown
*
outer
,
void
**
surface
)
{
struct
dxgi_surface
*
object
;
HRESULT
hr
;
FIXME
(
"iface %p, desc %p, usage %#x, shared_resource %p, outer %p, surface %p partial stub!
\n
"
,
iface
,
desc
,
usage
,
shared_resource
,
outer
,
surface
);
...
...
@@ -273,22 +274,16 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *ifa
return
E_OUTOFMEMORY
;
}
object
->
vtbl
=
&
dxgi_surface_vtbl
;
object
->
inner_unknown_vtbl
=
&
dxgi_surface_inner_unknown_vtbl
;
object
->
refcount
=
1
;
if
(
outer
)
{
object
->
outer_unknown
=
outer
;
*
surface
=
&
object
->
inner_unknown_vtbl
;
}
else
hr
=
dxgi_surface_init
(
object
,
outer
);
if
(
FAILED
(
hr
))
{
object
->
outer_unknown
=
(
IUnknown
*
)
&
object
->
inner_unknown_vtbl
;
*
surface
=
object
;
WARN
(
"Failed to initialize surface, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created IDXGISurface %p
\n
"
,
object
);
*
surface
=
outer
?
(
void
*
)
&
object
->
inner_unknown_vtbl
:
object
;
return
S_OK
;
}
...
...
dlls/dxgi/dxgi_private.h
View file @
4e29ade6
...
...
@@ -130,8 +130,6 @@ struct dxgi_swapchain
};
/* IDXGISurface */
extern
const
struct
IDXGISurfaceVtbl
dxgi_surface_vtbl
DECLSPEC_HIDDEN
;
extern
const
struct
IUnknownVtbl
dxgi_surface_inner_unknown_vtbl
DECLSPEC_HIDDEN
;
struct
dxgi_surface
{
const
struct
IDXGISurfaceVtbl
*
vtbl
;
...
...
@@ -140,4 +138,6 @@ struct dxgi_surface
LONG
refcount
;
};
HRESULT
dxgi_surface_init
(
struct
dxgi_surface
*
surface
,
IUnknown
*
outer
)
DECLSPEC_HIDDEN
;
#endif
/* __WINE_DXGI_PRIVATE_H */
dlls/dxgi/surface.c
View file @
4e29ade6
...
...
@@ -165,7 +165,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_surface_Unmap(IDXGISurface *iface)
return
E_NOTIMPL
;
}
const
struct
IDXGISurfaceVtbl
dxgi_surface_vtbl
=
static
const
struct
IDXGISurfaceVtbl
dxgi_surface_vtbl
=
{
/* IUnknown methods */
dxgi_surface_QueryInterface
,
...
...
@@ -184,10 +184,20 @@ const struct IDXGISurfaceVtbl dxgi_surface_vtbl =
dxgi_surface_Unmap
,
};
const
struct
IUnknownVtbl
dxgi_surface_inner_unknown_vtbl
=
static
const
struct
IUnknownVtbl
dxgi_surface_inner_unknown_vtbl
=
{
/* IUnknown methods */
dxgi_surface_inner_QueryInterface
,
dxgi_surface_inner_AddRef
,
dxgi_surface_inner_Release
,
};
HRESULT
dxgi_surface_init
(
struct
dxgi_surface
*
surface
,
IUnknown
*
outer
)
{
surface
->
vtbl
=
&
dxgi_surface_vtbl
;
surface
->
inner_unknown_vtbl
=
&
dxgi_surface_inner_unknown_vtbl
;
surface
->
refcount
=
1
;
surface
->
outer_unknown
=
outer
?
outer
:
(
IUnknown
*
)
&
surface
->
inner_unknown_vtbl
;
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