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
90112e97
Commit
90112e97
authored
Jun 21, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jun 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Move IDirect3DTexture and IDirect3DTexture2 to IDirectDrawSurface reference counts.
parent
5f6d7021
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
surface.c
dlls/ddraw/surface.c
+4
-4
dsurface.c
dlls/ddraw/tests/dsurface.c
+8
-8
No files found.
dlls/ddraw/surface.c
View file @
90112e97
...
...
@@ -329,7 +329,7 @@ static ULONG WINAPI d3d_texture2_AddRef(IDirect3DTexture2 *iface)
IDirectDrawSurfaceImpl
*
This
=
surface_from_texture2
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
ddraw_surface
7_AddRef
(
&
This
->
IDirectDrawSurface7
_iface
);
return
ddraw_surface
1_AddRef
(
&
This
->
IDirectDrawSurface
_iface
);
}
static
ULONG
WINAPI
d3d_texture1_AddRef
(
IDirect3DTexture
*
iface
)
...
...
@@ -337,7 +337,7 @@ static ULONG WINAPI d3d_texture1_AddRef(IDirect3DTexture *iface)
IDirectDrawSurfaceImpl
*
This
=
surface_from_texture1
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
ddraw_surface
7_AddRef
(
&
This
->
IDirectDrawSurface7
_iface
);
return
ddraw_surface
1_AddRef
(
&
This
->
IDirectDrawSurface
_iface
);
}
/*****************************************************************************
...
...
@@ -606,7 +606,7 @@ static ULONG WINAPI d3d_texture2_Release(IDirect3DTexture2 *iface)
IDirectDrawSurfaceImpl
*
This
=
surface_from_texture2
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
ddraw_surface
7_Release
(
&
This
->
IDirectDrawSurface7
_iface
);
return
ddraw_surface
1_Release
(
&
This
->
IDirectDrawSurface
_iface
);
}
static
ULONG
WINAPI
d3d_texture1_Release
(
IDirect3DTexture
*
iface
)
...
...
@@ -614,7 +614,7 @@ static ULONG WINAPI d3d_texture1_Release(IDirect3DTexture *iface)
IDirectDrawSurfaceImpl
*
This
=
surface_from_texture1
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
ddraw_surface
7_Release
(
&
This
->
IDirectDrawSurface7
_iface
);
return
ddraw_surface
1_Release
(
&
This
->
IDirectDrawSurface
_iface
);
}
/*****************************************************************************
...
...
dlls/ddraw/tests/dsurface.c
View file @
90112e97
...
...
@@ -1111,29 +1111,29 @@ static void IFaceRefCount(void)
if
(
SUCCEEDED
(
ret
))
{
ref
=
getRefcount
((
IUnknown
*
)
tex
);
todo_wine
ok
(
ref
==
2
,
"Refcount is %u, expected 2
\n
"
,
ref
);
ok
(
ref
==
2
,
"Refcount is %u, expected 2
\n
"
,
ref
);
ref
=
getRefcount
((
IUnknown
*
)
surf
);
todo_wine
ok
(
ref
==
2
,
"Refcount is %u, expected 2
\n
"
,
ref
);
ok
(
ref
==
2
,
"Refcount is %u, expected 2
\n
"
,
ref
);
IDirectDrawSurface_QueryInterface
(
surf
,
&
IID_IDirect3DTexture2
,
(
void
**
)
&
tex2
);
ref
=
getRefcount
((
IUnknown
*
)
tex
);
todo_wine
ok
(
ref
==
3
,
"Refcount is %u, expected 3
\n
"
,
ref
);
ok
(
ref
==
3
,
"Refcount is %u, expected 3
\n
"
,
ref
);
ref
=
getRefcount
((
IUnknown
*
)
tex2
);
todo_wine
ok
(
ref
==
3
,
"Refcount is %u, expected 3
\n
"
,
ref
);
ok
(
ref
==
3
,
"Refcount is %u, expected 3
\n
"
,
ref
);
ref
=
getRefcount
((
IUnknown
*
)
surf
);
todo_wine
ok
(
ref
==
3
,
"Refcount is %u, expected 3
\n
"
,
ref
);
ok
(
ref
==
3
,
"Refcount is %u, expected 3
\n
"
,
ref
);
IDirectDrawSurface_QueryInterface
(
surf
,
&
IID_IDirectDrawGammaControl
,
(
void
**
)
&
gamma
);
ref
=
getRefcount
((
IUnknown
*
)
gamma
);
todo_wine
ok
(
ref
==
1
,
"Refcount is %u, expected 1
\n
"
,
ref
);
ref
=
IDirect3DTexture2_Release
(
tex2
);
/* Release the texture */
todo_wine
ok
(
ref
==
2
,
"Refcount is %u, expected 2
\n
"
,
ref
);
ok
(
ref
==
2
,
"Refcount is %u, expected 2
\n
"
,
ref
);
ref
=
getRefcount
((
IUnknown
*
)
surf
);
todo_wine
ok
(
ref
==
2
,
"Refcount is %u, expected 2
\n
"
,
ref
);
ok
(
ref
==
2
,
"Refcount is %u, expected 2
\n
"
,
ref
);
ref
=
IDirect3DTexture_Release
(
tex
);
/* Release the texture */
todo_wine
ok
(
ref
==
1
,
"Refcount is %u, expected 1
\n
"
,
ref
);
ok
(
ref
==
1
,
"Refcount is %u, expected 1
\n
"
,
ref
);
ref
=
getRefcount
((
IUnknown
*
)
surf
);
ok
(
ref
==
1
,
"Refcount is %u, expected 1
\n
"
,
ref
);
...
...
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