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
0c916104
Commit
0c916104
authored
Sep 16, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move resource methods to the base surface class.
parent
8434060b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
67 deletions
+71
-67
surface.c
dlls/wined3d/surface.c
+9
-49
surface_base.c
dlls/wined3d/surface_base.c
+44
-0
surface_gdi.c
dlls/wined3d/surface_gdi.c
+9
-9
wined3d_private.h
dlls/wined3d/wined3d_private.h
+9
-9
No files found.
dlls/wined3d/surface.c
View file @
0c916104
...
...
@@ -334,13 +334,6 @@ GLenum surface_get_gl_buffer(IWineD3DSurface *iface, IWineD3DSwapChain *swapchai
return
GL_BACK
;
}
ULONG
WINAPI
IWineD3DSurfaceImpl_AddRef
(
IWineD3DSurface
*
iface
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
resource
.
ref
);
TRACE
(
"(%p) : AddRef increasing from %d
\n
"
,
This
,
ref
-
1
);
return
ref
;
}
ULONG
WINAPI
IWineD3DSurfaceImpl_Release
(
IWineD3DSurface
*
iface
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
resource
.
ref
);
...
...
@@ -434,29 +427,6 @@ ULONG WINAPI IWineD3DSurfaceImpl_Release(IWineD3DSurface *iface) {
/* ****************************************************
IWineD3DSurface IWineD3DResource parts follow
**************************************************** */
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetDevice
(
IWineD3DSurface
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
return
IWineD3DResourceImpl_GetDevice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
}
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
return
IWineD3DResourceImpl_SetPrivateData
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
}
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
return
IWineD3DResourceImpl_GetPrivateData
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
}
HRESULT
WINAPI
IWineD3DSurfaceImpl_FreePrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
)
{
return
IWineD3DResourceImpl_FreePrivateData
((
IWineD3DResource
*
)
iface
,
refguid
);
}
DWORD
WINAPI
IWineD3DSurfaceImpl_SetPriority
(
IWineD3DSurface
*
iface
,
DWORD
PriorityNew
)
{
return
IWineD3DResourceImpl_SetPriority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
}
DWORD
WINAPI
IWineD3DSurfaceImpl_GetPriority
(
IWineD3DSurface
*
iface
)
{
return
IWineD3DResourceImpl_GetPriority
((
IWineD3DResource
*
)
iface
);
}
void
WINAPI
IWineD3DSurfaceImpl_PreLoad
(
IWineD3DSurface
*
iface
)
{
/* TODO: check for locks */
...
...
@@ -503,16 +473,6 @@ void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) {
return
;
}
WINED3DRESOURCETYPE
WINAPI
IWineD3DSurfaceImpl_GetType
(
IWineD3DSurface
*
iface
)
{
TRACE
(
"(%p) : calling resourceimpl_GetType
\n
"
,
iface
);
return
IWineD3DResourceImpl_GetType
((
IWineD3DResource
*
)
iface
);
}
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetParent
(
IWineD3DSurface
*
iface
,
IUnknown
**
pParent
)
{
TRACE
(
"(%p) : calling resourceimpl_GetParent
\n
"
,
iface
);
return
IWineD3DResourceImpl_GetParent
((
IWineD3DResource
*
)
iface
,
pParent
);
}
/* ******************************************************
IWineD3DSurface IWineD3DSurface parts follow
****************************************************** */
...
...
@@ -4010,18 +3970,18 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
{
/* IUnknown */
IWineD3DBaseSurfaceImpl_QueryInterface
,
IWineD3DSurfaceImpl_AddRef
,
IWineD3D
Base
SurfaceImpl_AddRef
,
IWineD3DSurfaceImpl_Release
,
/* IWineD3DResource */
IWineD3DSurfaceImpl_GetParent
,
IWineD3DSurfaceImpl_GetDevice
,
IWineD3DSurfaceImpl_SetPrivateData
,
IWineD3DSurfaceImpl_GetPrivateData
,
IWineD3DSurfaceImpl_FreePrivateData
,
IWineD3DSurfaceImpl_SetPriority
,
IWineD3DSurfaceImpl_GetPriority
,
IWineD3D
Base
SurfaceImpl_GetParent
,
IWineD3D
Base
SurfaceImpl_GetDevice
,
IWineD3D
Base
SurfaceImpl_SetPrivateData
,
IWineD3D
Base
SurfaceImpl_GetPrivateData
,
IWineD3D
Base
SurfaceImpl_FreePrivateData
,
IWineD3D
Base
SurfaceImpl_SetPriority
,
IWineD3D
Base
SurfaceImpl_GetPriority
,
IWineD3DSurfaceImpl_PreLoad
,
IWineD3DSurfaceImpl_GetType
,
IWineD3D
Base
SurfaceImpl_GetType
,
/* IWineD3DSurface */
IWineD3DSurfaceImpl_GetContainer
,
IWineD3DSurfaceImpl_GetDesc
,
...
...
dlls/wined3d/surface_base.c
View file @
0c916104
...
...
@@ -54,3 +54,47 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_QueryInterface(IWineD3DSurface *iface, RE
*
ppobj
=
NULL
;
return
E_NOINTERFACE
;
}
ULONG
WINAPI
IWineD3DBaseSurfaceImpl_AddRef
(
IWineD3DSurface
*
iface
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
resource
.
ref
);
TRACE
(
"(%p) : AddRef increasing from %d
\n
"
,
This
,
ref
-
1
);
return
ref
;
}
/* ****************************************************
IWineD3DSurface IWineD3DResource parts follow
**************************************************** */
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetDevice
(
IWineD3DSurface
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
return
IWineD3DResourceImpl_GetDevice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
return
IWineD3DResourceImpl_SetPrivateData
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
return
IWineD3DResourceImpl_GetPrivateData
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_FreePrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
)
{
return
IWineD3DResourceImpl_FreePrivateData
((
IWineD3DResource
*
)
iface
,
refguid
);
}
DWORD
WINAPI
IWineD3DBaseSurfaceImpl_SetPriority
(
IWineD3DSurface
*
iface
,
DWORD
PriorityNew
)
{
return
IWineD3DResourceImpl_SetPriority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
}
DWORD
WINAPI
IWineD3DBaseSurfaceImpl_GetPriority
(
IWineD3DSurface
*
iface
)
{
return
IWineD3DResourceImpl_GetPriority
((
IWineD3DResource
*
)
iface
);
}
WINED3DRESOURCETYPE
WINAPI
IWineD3DBaseSurfaceImpl_GetType
(
IWineD3DSurface
*
iface
)
{
TRACE
(
"(%p) : calling resourceimpl_GetType
\n
"
,
iface
);
return
IWineD3DResourceImpl_GetType
((
IWineD3DResource
*
)
iface
);
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetParent
(
IWineD3DSurface
*
iface
,
IUnknown
**
pParent
)
{
TRACE
(
"(%p) : calling resourceimpl_GetParent
\n
"
,
iface
);
return
IWineD3DResourceImpl_GetParent
((
IWineD3DResource
*
)
iface
,
pParent
);
}
dlls/wined3d/surface_gdi.c
View file @
0c916104
...
...
@@ -1554,18 +1554,18 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
{
/* IUnknown */
IWineD3DBaseSurfaceImpl_QueryInterface
,
IWineD3DSurfaceImpl_AddRef
,
IWineD3D
Base
SurfaceImpl_AddRef
,
IWineD3DSurfaceImpl_Release
,
/* IWineD3DResource */
IWineD3DSurfaceImpl_GetParent
,
IWineD3DSurfaceImpl_GetDevice
,
IWineD3DSurfaceImpl_SetPrivateData
,
IWineD3DSurfaceImpl_GetPrivateData
,
IWineD3DSurfaceImpl_FreePrivateData
,
IWineD3DSurfaceImpl_SetPriority
,
IWineD3DSurfaceImpl_GetPriority
,
IWineD3D
Base
SurfaceImpl_GetParent
,
IWineD3D
Base
SurfaceImpl_GetDevice
,
IWineD3D
Base
SurfaceImpl_SetPrivateData
,
IWineD3D
Base
SurfaceImpl_GetPrivateData
,
IWineD3D
Base
SurfaceImpl_FreePrivateData
,
IWineD3D
Base
SurfaceImpl_SetPriority
,
IWineD3D
Base
SurfaceImpl_GetPriority
,
IWineGDISurfaceImpl_PreLoad
,
IWineD3DSurfaceImpl_GetType
,
IWineD3D
Base
SurfaceImpl_GetType
,
/* IWineD3DSurface */
IWineD3DSurfaceImpl_GetContainer
,
IWineD3DSurfaceImpl_GetDesc
,
...
...
dlls/wined3d/wined3d_private.h
View file @
0c916104
...
...
@@ -1141,17 +1141,17 @@ extern const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl;
/* Predeclare the shared Surface functions */
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_QueryInterface
(
IWineD3DSurface
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
);
ULONG
WINAPI
IWineD3DSurfaceImpl_AddRef
(
IWineD3DSurface
*
iface
);
ULONG
WINAPI
IWineD3D
Base
SurfaceImpl_AddRef
(
IWineD3DSurface
*
iface
);
ULONG
WINAPI
IWineD3DSurfaceImpl_Release
(
IWineD3DSurface
*
iface
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetParent
(
IWineD3DSurface
*
iface
,
IUnknown
**
pParent
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetDevice
(
IWineD3DSurface
*
iface
,
IWineD3DDevice
**
ppDevice
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_FreePrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
);
DWORD
WINAPI
IWineD3DSurfaceImpl_SetPriority
(
IWineD3DSurface
*
iface
,
DWORD
PriorityNew
);
DWORD
WINAPI
IWineD3DSurfaceImpl_GetPriority
(
IWineD3DSurface
*
iface
);
HRESULT
WINAPI
IWineD3D
Base
SurfaceImpl_GetParent
(
IWineD3DSurface
*
iface
,
IUnknown
**
pParent
);
HRESULT
WINAPI
IWineD3D
Base
SurfaceImpl_GetDevice
(
IWineD3DSurface
*
iface
,
IWineD3DDevice
**
ppDevice
);
HRESULT
WINAPI
IWineD3D
Base
SurfaceImpl_SetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
);
HRESULT
WINAPI
IWineD3D
Base
SurfaceImpl_GetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
);
HRESULT
WINAPI
IWineD3D
Base
SurfaceImpl_FreePrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
);
DWORD
WINAPI
IWineD3D
Base
SurfaceImpl_SetPriority
(
IWineD3DSurface
*
iface
,
DWORD
PriorityNew
);
DWORD
WINAPI
IWineD3D
Base
SurfaceImpl_GetPriority
(
IWineD3DSurface
*
iface
);
void
WINAPI
IWineD3DSurfaceImpl_PreLoad
(
IWineD3DSurface
*
iface
);
WINED3DRESOURCETYPE
WINAPI
IWineD3DSurfaceImpl_GetType
(
IWineD3DSurface
*
iface
);
WINED3DRESOURCETYPE
WINAPI
IWineD3D
Base
SurfaceImpl_GetType
(
IWineD3DSurface
*
iface
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetContainer
(
IWineD3DSurface
*
iface
,
REFIID
riid
,
void
**
ppContainer
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetDesc
(
IWineD3DSurface
*
iface
,
WINED3DSURFACE_DESC
*
pDesc
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetBltStatus
(
IWineD3DSurface
*
iface
,
DWORD
Flags
);
...
...
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