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
134137cd
Commit
134137cd
authored
Jan 06, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass an IWineD3DResourceImpl pointer to resource_cleanup().
parent
7080922e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
24 deletions
+25
-24
basetexture.c
dlls/wined3d/basetexture.c
+2
-2
buffer.c
dlls/wined3d/buffer.c
+3
-3
resource.c
dlls/wined3d/resource.c
+16
-15
surface.c
dlls/wined3d/surface.c
+1
-1
surface_gdi.c
dlls/wined3d/surface_gdi.c
+1
-1
volume.c
dlls/wined3d/volume.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/basetexture.c
View file @
134137cd
...
...
@@ -48,7 +48,7 @@ HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, const struct wined3d_
if
(
!
texture
->
baseTexture
.
sub_resources
)
{
ERR
(
"Failed to allocate sub-resource array.
\n
"
);
resource_cleanup
((
IWineD3DResource
*
)
texture
);
resource_cleanup
((
IWineD3DResource
Impl
*
)
texture
);
return
E_OUTOFMEMORY
;
}
...
...
@@ -79,7 +79,7 @@ void basetexture_cleanup(IWineD3DBaseTextureImpl *texture)
{
basetexture_unload
(
texture
);
HeapFree
(
GetProcessHeap
(),
0
,
texture
->
baseTexture
.
sub_resources
);
resource_cleanup
((
IWineD3DResource
*
)
texture
);
resource_cleanup
((
IWineD3DResource
Impl
*
)
texture
);
}
IWineD3DResourceImpl
*
basetexture_get_sub_resource
(
IWineD3DBaseTextureImpl
*
texture
,
UINT
sub_resource_idx
)
...
...
dlls/wined3d/buffer.c
View file @
134137cd
...
...
@@ -742,7 +742,7 @@ static ULONG STDMETHODCALLTYPE buffer_Release(IWineD3DBuffer *iface)
if
(
!
refcount
)
{
buffer_UnLoad
(
iface
);
resource_cleanup
((
IWineD3DResource
*
)
iface
);
resource_cleanup
((
IWineD3DResource
Impl
*
)
iface
);
This
->
resource
.
parent_ops
->
wined3d_object_destroyed
(
This
->
resource
.
parent
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
maps
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
@@ -1521,7 +1521,7 @@ HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device,
{
ERR
(
"Failed to map buffer, hr %#x
\n
"
,
hr
);
buffer_UnLoad
((
IWineD3DBuffer
*
)
buffer
);
resource_cleanup
((
IWineD3DResource
*
)
buffer
);
resource_cleanup
((
IWineD3DResource
Impl
*
)
buffer
);
return
hr
;
}
...
...
@@ -1535,7 +1535,7 @@ HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device,
{
ERR
(
"Out of memory
\n
"
);
buffer_UnLoad
((
IWineD3DBuffer
*
)
buffer
);
resource_cleanup
((
IWineD3DResource
*
)
buffer
);
resource_cleanup
((
IWineD3DResource
Impl
*
)
buffer
);
return
E_OUTOFMEMORY
;
}
buffer
->
maps_size
=
1
;
...
...
dlls/wined3d/resource.c
View file @
134137cd
...
...
@@ -93,33 +93,34 @@ HRESULT resource_init(struct IWineD3DResourceImpl *resource, WINED3DRESOURCETYPE
return
WINED3D_OK
;
}
void
resource_cleanup
(
IWineD3DResource
*
ifa
ce
)
void
resource_cleanup
(
struct
IWineD3DResourceImpl
*
resour
ce
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
struct
private_data
*
data
;
struct
list
*
e1
,
*
e2
;
HRESULT
hr
;
TRACE
(
"(%p) Cleaning up resource
\n
"
,
This
);
if
(
This
->
resource
.
pool
==
WINED3DPOOL_DEFAULT
)
{
TRACE
(
"Decrementing device memory pool by %u
\n
"
,
This
->
resource
.
size
);
WineD3DAdapterChangeGLRam
(
This
->
resource
.
device
,
-
This
->
resource
.
size
);
TRACE
(
"Cleaning up resource %p.
\n
"
,
resource
);
if
(
resource
->
resource
.
pool
==
WINED3DPOOL_DEFAULT
)
{
TRACE
(
"Decrementing device memory pool by %u.
\n
"
,
resource
->
resource
.
size
);
WineD3DAdapterChangeGLRam
(
resource
->
resource
.
device
,
-
resource
->
resource
.
size
);
}
LIST_FOR_EACH_SAFE
(
e1
,
e2
,
&
This
->
resource
.
privateData
)
LIST_FOR_EACH_SAFE
(
e1
,
e2
,
&
resource
->
resource
.
privateData
)
{
data
=
LIST_ENTRY
(
e1
,
struct
private_data
,
entry
);
hr
=
resource_free_private_data
(
iface
,
&
data
->
tag
);
if
(
hr
!=
WINED3D_OK
)
{
ERR
(
"Failed to free private data when destroying resource %p, hr = %08x
\n
"
,
This
,
hr
);
}
hr
=
resource_free_private_data
((
IWineD3DResource
*
)
resource
,
&
data
->
tag
);
if
(
FAILED
(
hr
))
ERR
(
"Failed to free private data when destroying resource %p, hr = %#x.
\n
"
,
resource
,
hr
);
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
resource
.
heapMemory
);
This
->
resource
.
allocatedMemory
=
0
;
This
->
resource
.
heapMemory
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
resource
->
resource
.
heapMemory
);
resource
->
resource
.
allocatedMemory
=
0
;
resource
->
resource
.
heapMemory
=
0
;
if
(
This
->
resource
.
device
)
device_resource_released
(
This
->
resource
.
device
,
iface
);
if
(
resource
->
resource
.
device
)
device_resource_released
(
resource
->
resource
.
device
,
(
IWineD3DResource
*
)
resource
);
}
void
resource_unload
(
IWineD3DResourceImpl
*
resource
)
...
...
dlls/wined3d/surface.c
View file @
134137cd
...
...
@@ -89,7 +89,7 @@ static void surface_cleanup(IWineD3DSurfaceImpl *This)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
palette9
);
resource_cleanup
((
IWineD3DResource
*
)
This
);
resource_cleanup
((
IWineD3DResource
Impl
*
)
This
);
}
void
surface_set_container
(
IWineD3DSurfaceImpl
*
surface
,
enum
wined3d_container_type
type
,
IWineD3DBase
*
container
)
...
...
dlls/wined3d/surface_gdi.c
View file @
134137cd
...
...
@@ -54,7 +54,7 @@ void surface_gdi_cleanup(IWineD3DSurfaceImpl *This)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
palette9
);
resource_cleanup
((
IWineD3DResource
*
)
This
);
resource_cleanup
((
IWineD3DResource
Impl
*
)
This
);
}
/*****************************************************************************
...
...
dlls/wined3d/volume.c
View file @
134137cd
...
...
@@ -133,7 +133,7 @@ static ULONG WINAPI IWineD3DVolumeImpl_Release(IWineD3DVolume *iface) {
if
(
!
ref
)
{
resource_cleanup
((
IWineD3DResource
*
)
iface
);
resource_cleanup
((
IWineD3DResource
Impl
*
)
iface
);
This
->
resource
.
parent_ops
->
wined3d_object_destroyed
(
This
->
resource
.
parent
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
134137cd
...
...
@@ -1828,7 +1828,7 @@ typedef struct IWineD3DResourceImpl
IWineD3DResourceClass
resource
;
}
IWineD3DResourceImpl
;
void
resource_cleanup
(
IWineD3DResource
*
ifa
ce
)
DECLSPEC_HIDDEN
;
void
resource_cleanup
(
struct
IWineD3DResourceImpl
*
resour
ce
)
DECLSPEC_HIDDEN
;
HRESULT
resource_free_private_data
(
IWineD3DResource
*
iface
,
REFGUID
guid
)
DECLSPEC_HIDDEN
;
DWORD
resource_get_priority
(
IWineD3DResource
*
iface
)
DECLSPEC_HIDDEN
;
HRESULT
resource_get_private_data
(
IWineD3DResource
*
iface
,
REFGUID
guid
,
...
...
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