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
a80749fd
Commit
a80749fd
authored
Jan 07, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass an IWineD3DResourceImpl pointer to resource_set_private_data().
parent
d512ccdf
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
30 deletions
+29
-30
buffer.c
dlls/wined3d/buffer.c
+1
-1
cubetexture.c
dlls/wined3d/cubetexture.c
+1
-1
resource.c
dlls/wined3d/resource.c
+22
-23
surface_base.c
dlls/wined3d/surface_base.c
+1
-1
texture.c
dlls/wined3d/texture.c
+1
-1
volume.c
dlls/wined3d/volume.c
+1
-1
volumetexture.c
dlls/wined3d/volumetexture.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/buffer.c
View file @
a80749fd
...
...
@@ -764,7 +764,7 @@ static void * STDMETHODCALLTYPE buffer_GetParent(IWineD3DBuffer *iface)
static
HRESULT
STDMETHODCALLTYPE
buffer_SetPrivateData
(
IWineD3DBuffer
*
iface
,
REFGUID
guid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
return
resource_set_private_data
((
IWineD3DResource
*
)
iface
,
guid
,
data
,
data_size
,
flags
);
return
resource_set_private_data
((
IWineD3DResource
Impl
*
)
iface
,
guid
,
data
,
data_size
,
flags
);
}
static
HRESULT
STDMETHODCALLTYPE
buffer_GetPrivateData
(
IWineD3DBuffer
*
iface
,
...
...
dlls/wined3d/cubetexture.c
View file @
a80749fd
...
...
@@ -215,7 +215,7 @@ static ULONG WINAPI IWineD3DCubeTextureImpl_Release(IWineD3DCubeTexture *iface)
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_SetPrivateData
(
IWineD3DCubeTexture
*
iface
,
REFGUID
riid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
return
resource_set_private_data
((
IWineD3DResource
*
)
iface
,
riid
,
data
,
data_size
,
flags
);
return
resource_set_private_data
((
IWineD3DResource
Impl
*
)
iface
,
riid
,
data
,
data_size
,
flags
);
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_GetPrivateData
(
IWineD3DCubeTexture
*
iface
,
...
...
dlls/wined3d/resource.c
View file @
a80749fd
...
...
@@ -147,47 +147,46 @@ static struct private_data *resource_find_private_data(IWineD3DResourceImpl *Thi
return
NULL
;
}
HRESULT
resource_set_private_data
(
IWineD3DResource
*
iface
,
REFGUID
ref
guid
,
const
void
*
pData
,
DWORD
SizeOfData
,
DWORD
flags
)
HRESULT
resource_set_private_data
(
struct
IWineD3DResourceImpl
*
resource
,
REFGUID
guid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
struct
private_data
*
data
;
struct
private_data
*
d
;
TRACE
(
"
ifa
ce %p, riid %s, data %p, data_size %u, flags %#x.
\n
"
,
iface
,
debugstr_guid
(
refguid
),
pData
,
SizeOfData
,
flags
);
TRACE
(
"
resour
ce %p, riid %s, data %p, data_size %u, flags %#x.
\n
"
,
resource
,
debugstr_guid
(
guid
),
data
,
data_size
,
flags
);
resource_free_private_data
(
This
,
ref
guid
);
resource_free_private_data
(
resource
,
guid
);
d
ata
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
data
));
if
(
!
d
ata
)
return
E_OUTOFMEMORY
;
d
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
d
));
if
(
!
d
)
return
E_OUTOFMEMORY
;
d
ata
->
tag
=
*
ref
guid
;
d
ata
->
flags
=
flags
;
d
->
tag
=
*
guid
;
d
->
flags
=
flags
;
if
(
flags
&
WINED3DSPD_IUNKNOWN
)
{
if
(
SizeOfData
!=
sizeof
(
IUnknown
*
))
if
(
data_size
!=
sizeof
(
IUnknown
*
))
{
WARN
(
"IUnknown data with size %
d, returning WINED3DERR_INVALIDCALL
\n
"
,
SizeOfData
);
HeapFree
(
GetProcessHeap
(),
0
,
d
ata
);
WARN
(
"IUnknown data with size %
u, returning WINED3DERR_INVALIDCALL.
\n
"
,
data_size
);
HeapFree
(
GetProcessHeap
(),
0
,
d
);
return
WINED3DERR_INVALIDCALL
;
}
d
ata
->
ptr
.
object
=
(
LPUNKNOWN
)
pD
ata
;
d
ata
->
size
=
sizeof
(
LPUNKNOWN
);
IUnknown_AddRef
(
d
ata
->
ptr
.
object
);
d
->
ptr
.
object
=
(
IUnknown
*
)
d
ata
;
d
->
size
=
sizeof
(
IUnknown
*
);
IUnknown_AddRef
(
d
->
ptr
.
object
);
}
else
{
d
ata
->
ptr
.
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
SizeOfData
);
if
(
!
d
ata
->
ptr
.
data
)
d
->
ptr
.
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
data_size
);
if
(
!
d
->
ptr
.
data
)
{
HeapFree
(
GetProcessHeap
(),
0
,
d
ata
);
HeapFree
(
GetProcessHeap
(),
0
,
d
);
return
E_OUTOFMEMORY
;
}
d
ata
->
size
=
SizeOfData
;
memcpy
(
d
ata
->
ptr
.
data
,
pData
,
SizeOfData
);
d
->
size
=
data_size
;
memcpy
(
d
->
ptr
.
data
,
data
,
data_size
);
}
list_add_tail
(
&
This
->
resource
.
privateData
,
&
data
->
entry
);
list_add_tail
(
&
resource
->
resource
.
privateData
,
&
d
->
entry
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/surface_base.c
View file @
a80749fd
...
...
@@ -114,7 +114,7 @@ ULONG WINAPI IWineD3DBaseSurfaceImpl_AddRef(IWineD3DSurface *iface) {
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
riid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
return
resource_set_private_data
((
IWineD3DResource
*
)
iface
,
riid
,
data
,
data_size
,
flags
);
return
resource_set_private_data
((
IWineD3DResource
Impl
*
)
iface
,
riid
,
data
,
data_size
,
flags
);
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetPrivateData
(
IWineD3DSurface
*
iface
,
...
...
dlls/wined3d/texture.c
View file @
a80749fd
...
...
@@ -240,7 +240,7 @@ static ULONG WINAPI IWineD3DTextureImpl_Release(IWineD3DTexture *iface) {
static
HRESULT
WINAPI
IWineD3DTextureImpl_SetPrivateData
(
IWineD3DTexture
*
iface
,
REFGUID
riid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
return
resource_set_private_data
((
IWineD3DResource
*
)
iface
,
riid
,
data
,
data_size
,
flags
);
return
resource_set_private_data
((
IWineD3DResource
Impl
*
)
iface
,
riid
,
data
,
data_size
,
flags
);
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_GetPrivateData
(
IWineD3DTexture
*
iface
,
...
...
dlls/wined3d/volume.c
View file @
a80749fd
...
...
@@ -153,7 +153,7 @@ static void * WINAPI IWineD3DVolumeImpl_GetParent(IWineD3DVolume *iface)
static
HRESULT
WINAPI
IWineD3DVolumeImpl_SetPrivateData
(
IWineD3DVolume
*
iface
,
REFGUID
riid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
return
resource_set_private_data
((
IWineD3DResource
*
)
iface
,
riid
,
data
,
data_size
,
flags
);
return
resource_set_private_data
((
IWineD3DResource
Impl
*
)
iface
,
riid
,
data
,
data_size
,
flags
);
}
static
HRESULT
WINAPI
IWineD3DVolumeImpl_GetPrivateData
(
IWineD3DVolume
*
iface
,
...
...
dlls/wined3d/volumetexture.c
View file @
a80749fd
...
...
@@ -160,7 +160,7 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DVolumeTexture *ifa
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_SetPrivateData
(
IWineD3DVolumeTexture
*
iface
,
REFGUID
riid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
return
resource_set_private_data
((
IWineD3DResource
*
)
iface
,
riid
,
data
,
data_size
,
flags
);
return
resource_set_private_data
((
IWineD3DResource
Impl
*
)
iface
,
riid
,
data
,
data_size
,
flags
);
}
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_GetPrivateData
(
IWineD3DVolumeTexture
*
iface
,
...
...
dlls/wined3d/wined3d_private.h
View file @
a80749fd
...
...
@@ -1838,7 +1838,7 @@ HRESULT resource_init(struct IWineD3DResourceImpl *resource, WINED3DRESOURCETYPE
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
WINED3DRESOURCETYPE
resource_get_type
(
IWineD3DResource
*
iface
)
DECLSPEC_HIDDEN
;
DWORD
resource_set_priority
(
IWineD3DResource
*
iface
,
DWORD
new_priority
)
DECLSPEC_HIDDEN
;
HRESULT
resource_set_private_data
(
IWineD3DResource
*
ifa
ce
,
REFGUID
guid
,
HRESULT
resource_set_private_data
(
struct
IWineD3DResourceImpl
*
resour
ce
,
REFGUID
guid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
void
resource_unload
(
IWineD3DResourceImpl
*
resource
)
DECLSPEC_HIDDEN
;
...
...
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