Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
91a1ed8b
Commit
91a1ed8b
authored
Jul 27, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jul 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: COM cleanup for IDirect3DTexture interface.
parent
0a358286
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
ddraw_private.h
dlls/ddraw/ddraw_private.h
+3
-3
surface.c
dlls/ddraw/surface.c
+11
-10
No files found.
dlls/ddraw/ddraw_private.h
View file @
91a1ed8b
...
@@ -159,7 +159,7 @@ struct IDirectDrawSurfaceImpl
...
@@ -159,7 +159,7 @@ struct IDirectDrawSurfaceImpl
IDirectDrawSurface
IDirectDrawSurface_iface
;
IDirectDrawSurface
IDirectDrawSurface_iface
;
IDirectDrawGammaControl
IDirectDrawGammaControl_iface
;
IDirectDrawGammaControl
IDirectDrawGammaControl_iface
;
const
IDirect3DTexture2Vtbl
*
IDirect3DTexture2_vtbl
;
const
IDirect3DTexture2Vtbl
*
IDirect3DTexture2_vtbl
;
const
IDirect3DTextureVtbl
*
IDirect3DTexture_vtbl
;
IDirect3DTexture
IDirect3DTexture_iface
;
LONG
ref7
,
ref4
,
ref3
,
ref2
,
ref1
,
iface_count
,
gamma_count
;
LONG
ref7
,
ref4
,
ref3
,
ref2
,
ref1
,
iface_count
,
gamma_count
;
IUnknown
*
ifaceToRelease
;
IUnknown
*
ifaceToRelease
;
...
@@ -214,9 +214,9 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
...
@@ -214,9 +214,9 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
DDSURFACEDESC2
*
desc
,
UINT
mip_level
,
WINED3DSURFTYPE
surface_type
,
UINT
version
)
DECLSPEC_HIDDEN
;
DDSURFACEDESC2
*
desc
,
UINT
mip_level
,
WINED3DSURFTYPE
surface_type
,
UINT
version
)
DECLSPEC_HIDDEN
;
ULONG
ddraw_surface_release_iface
(
IDirectDrawSurfaceImpl
*
This
)
DECLSPEC_HIDDEN
;
ULONG
ddraw_surface_release_iface
(
IDirectDrawSurfaceImpl
*
This
)
DECLSPEC_HIDDEN
;
static
inline
IDirectDrawSurfaceImpl
*
surface_from_texture1
(
IDirect3DTexture
*
iface
)
static
inline
IDirectDrawSurfaceImpl
*
impl_from_IDirect3DTexture
(
IDirect3DTexture
*
iface
)
{
{
return
(
IDirectDrawSurfaceImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IDirectDrawSurfaceImpl
,
IDirect3DTexture_vtbl
)
);
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirect3DTexture_iface
);
}
}
static
inline
IDirectDrawSurfaceImpl
*
surface_from_texture2
(
IDirect3DTexture2
*
iface
)
static
inline
IDirectDrawSurfaceImpl
*
surface_from_texture2
(
IDirect3DTexture2
*
iface
)
...
...
dlls/ddraw/surface.c
View file @
91a1ed8b
...
@@ -141,7 +141,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
...
@@ -141,7 +141,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
{
{
if
(
IsEqualGUID
(
&
IID_IDirect3DTexture
,
riid
))
if
(
IsEqualGUID
(
&
IID_IDirect3DTexture
,
riid
))
{
{
*
obj
=
&
This
->
IDirect3DTexture_
vtbl
;
*
obj
=
&
This
->
IDirect3DTexture_
iface
;
TRACE
(
" returning Direct3DTexture interface at %p.
\n
"
,
*
obj
);
TRACE
(
" returning Direct3DTexture interface at %p.
\n
"
,
*
obj
);
}
}
else
else
...
@@ -209,7 +209,7 @@ static HRESULT WINAPI d3d_texture2_QueryInterface(IDirect3DTexture2 *iface, REFI
...
@@ -209,7 +209,7 @@ static HRESULT WINAPI d3d_texture2_QueryInterface(IDirect3DTexture2 *iface, REFI
static
HRESULT
WINAPI
d3d_texture1_QueryInterface
(
IDirect3DTexture
*
iface
,
REFIID
riid
,
void
**
object
)
static
HRESULT
WINAPI
d3d_texture1_QueryInterface
(
IDirect3DTexture
*
iface
,
REFIID
riid
,
void
**
object
)
{
{
IDirectDrawSurfaceImpl
*
This
=
surface_from_texture1
(
iface
);
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirect3DTexture
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
return
ddraw_surface7_QueryInterface
(
&
This
->
IDirectDrawSurface7_iface
,
riid
,
object
);
return
ddraw_surface7_QueryInterface
(
&
This
->
IDirectDrawSurface7_iface
,
riid
,
object
);
...
@@ -340,7 +340,7 @@ static ULONG WINAPI d3d_texture2_AddRef(IDirect3DTexture2 *iface)
...
@@ -340,7 +340,7 @@ static ULONG WINAPI d3d_texture2_AddRef(IDirect3DTexture2 *iface)
static
ULONG
WINAPI
d3d_texture1_AddRef
(
IDirect3DTexture
*
iface
)
static
ULONG
WINAPI
d3d_texture1_AddRef
(
IDirect3DTexture
*
iface
)
{
{
IDirectDrawSurfaceImpl
*
This
=
surface_from_texture1
(
iface
);
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirect3DTexture
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
ddraw_surface1_AddRef
(
&
This
->
IDirectDrawSurface_iface
);
return
ddraw_surface1_AddRef
(
&
This
->
IDirectDrawSurface_iface
);
...
@@ -623,7 +623,7 @@ static ULONG WINAPI d3d_texture2_Release(IDirect3DTexture2 *iface)
...
@@ -623,7 +623,7 @@ static ULONG WINAPI d3d_texture2_Release(IDirect3DTexture2 *iface)
static
ULONG
WINAPI
d3d_texture1_Release
(
IDirect3DTexture
*
iface
)
static
ULONG
WINAPI
d3d_texture1_Release
(
IDirect3DTexture
*
iface
)
{
{
IDirectDrawSurfaceImpl
*
This
=
surface_from_texture1
(
iface
);
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirect3DTexture
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
ddraw_surface1_Release
(
&
This
->
IDirectDrawSurface_iface
);
return
ddraw_surface1_Release
(
&
This
->
IDirectDrawSurface_iface
);
...
@@ -4450,7 +4450,7 @@ static HRESULT WINAPI d3d_texture2_PaletteChanged(IDirect3DTexture2 *iface, DWOR
...
@@ -4450,7 +4450,7 @@ static HRESULT WINAPI d3d_texture2_PaletteChanged(IDirect3DTexture2 *iface, DWOR
static
HRESULT
WINAPI
d3d_texture1_PaletteChanged
(
IDirect3DTexture
*
iface
,
DWORD
start
,
DWORD
count
)
static
HRESULT
WINAPI
d3d_texture1_PaletteChanged
(
IDirect3DTexture
*
iface
,
DWORD
start
,
DWORD
count
)
{
{
IDirectDrawSurfaceImpl
*
surface
=
surface_from_texture1
(
iface
);
IDirectDrawSurfaceImpl
*
surface
=
impl_from_IDirect3DTexture
(
iface
);
TRACE
(
"iface %p, start %u, count %u.
\n
"
,
iface
,
start
,
count
);
TRACE
(
"iface %p, start %u, count %u.
\n
"
,
iface
,
start
,
count
);
...
@@ -4521,12 +4521,12 @@ static HRESULT WINAPI d3d_texture2_GetHandle(IDirect3DTexture2 *iface,
...
@@ -4521,12 +4521,12 @@ static HRESULT WINAPI d3d_texture2_GetHandle(IDirect3DTexture2 *iface,
static
HRESULT
WINAPI
d3d_texture1_GetHandle
(
IDirect3DTexture
*
iface
,
static
HRESULT
WINAPI
d3d_texture1_GetHandle
(
IDirect3DTexture
*
iface
,
IDirect3DDevice
*
device
,
D3DTEXTUREHANDLE
*
handle
)
IDirect3DDevice
*
device
,
D3DTEXTUREHANDLE
*
handle
)
{
{
IDirect
3DTexture2
*
texture2
=
(
IDirect3DTexture2
*
)
&
surface_from_texture1
(
iface
)
->
IDirect3DTexture2_vtbl
;
IDirect
DrawSurfaceImpl
*
This
=
impl_from_IDirect3DTexture
(
iface
)
;
IDirect3DDevice2
*
device2
=
(
IDirect3DDevice2
*
)
&
device_from_device1
(
device
)
->
IDirect3DDevice2_vtbl
;
IDirect3DDevice2
*
device2
=
(
IDirect3DDevice2
*
)
&
device_from_device1
(
device
)
->
IDirect3DDevice2_vtbl
;
TRACE
(
"iface %p, device %p, handle %p.
\n
"
,
iface
,
device
,
handle
);
TRACE
(
"iface %p, device %p, handle %p.
\n
"
,
iface
,
device
,
handle
);
return
d3d_texture2_GetHandle
(
texture2
,
device2
,
handle
);
return
d3d_texture2_GetHandle
(
(
IDirect3DTexture2
*
)
&
This
->
IDirect3DTexture2_vtbl
,
device2
,
handle
);
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -4703,10 +4703,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
...
@@ -4703,10 +4703,11 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
static
HRESULT
WINAPI
d3d_texture1_Load
(
IDirect3DTexture
*
iface
,
IDirect3DTexture
*
src_texture
)
static
HRESULT
WINAPI
d3d_texture1_Load
(
IDirect3DTexture
*
iface
,
IDirect3DTexture
*
src_texture
)
{
{
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirect3DTexture
(
iface
);
IDirectDrawSurfaceImpl
*
src_surface
=
unsafe_impl_from_IDirect3DTexture
(
src_texture
);
IDirectDrawSurfaceImpl
*
src_surface
=
unsafe_impl_from_IDirect3DTexture
(
src_texture
);
TRACE
(
"iface %p, src_texture %p.
\n
"
,
iface
,
src_texture
);
TRACE
(
"iface %p, src_texture %p.
\n
"
,
iface
,
src_texture
);
return
d3d_texture2_Load
((
IDirect3DTexture2
*
)
&
surface_from_texture1
(
iface
)
->
IDirect3DTexture2_vtbl
,
return
d3d_texture2_Load
((
IDirect3DTexture2
*
)
&
This
->
IDirect3DTexture2_vtbl
,
src_surface
?
(
IDirect3DTexture2
*
)
&
src_surface
->
IDirect3DTexture2_vtbl
:
NULL
);
src_surface
?
(
IDirect3DTexture2
*
)
&
src_surface
->
IDirect3DTexture2_vtbl
:
NULL
);
}
}
...
@@ -5033,7 +5034,7 @@ IDirectDrawSurfaceImpl *unsafe_impl_from_IDirect3DTexture(IDirect3DTexture *ifac
...
@@ -5033,7 +5034,7 @@ IDirectDrawSurfaceImpl *unsafe_impl_from_IDirect3DTexture(IDirect3DTexture *ifac
{
{
if
(
!
iface
)
return
NULL
;
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
d3d_texture1_vtbl
);
assert
(
iface
->
lpVtbl
==
&
d3d_texture1_vtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirect3DTexture_
vtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirect3DTexture_
iface
);
}
}
static
void
STDMETHODCALLTYPE
ddraw_surface_wined3d_object_destroyed
(
void
*
parent
)
static
void
STDMETHODCALLTYPE
ddraw_surface_wined3d_object_destroyed
(
void
*
parent
)
...
@@ -5200,7 +5201,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
...
@@ -5200,7 +5201,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
surface
->
IDirectDrawSurface_iface
.
lpVtbl
=
&
ddraw_surface1_vtbl
;
surface
->
IDirectDrawSurface_iface
.
lpVtbl
=
&
ddraw_surface1_vtbl
;
surface
->
IDirectDrawGammaControl_iface
.
lpVtbl
=
&
ddraw_gamma_control_vtbl
;
surface
->
IDirectDrawGammaControl_iface
.
lpVtbl
=
&
ddraw_gamma_control_vtbl
;
surface
->
IDirect3DTexture2_vtbl
=
&
d3d_texture2_vtbl
;
surface
->
IDirect3DTexture2_vtbl
=
&
d3d_texture2_vtbl
;
surface
->
IDirect3DTexture_
v
tbl
=
&
d3d_texture1_vtbl
;
surface
->
IDirect3DTexture_
iface
.
lpV
tbl
=
&
d3d_texture1_vtbl
;
surface
->
iface_count
=
1
;
surface
->
iface_count
=
1
;
surface
->
version
=
version
;
surface
->
version
=
version
;
surface
->
ddraw
=
ddraw
;
surface
->
ddraw
=
ddraw
;
...
...
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