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
2ab5b833
Commit
2ab5b833
authored
Apr 05, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove COM from the rendertarget view implementation.
parent
519a3a91
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
92 deletions
+38
-92
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+1
-1
device.c
dlls/d3d10core/device.c
+2
-1
view.c
dlls/d3d10core/view.c
+4
-4
device.c
dlls/wined3d/device.c
+4
-10
view.c
dlls/wined3d/view.c
+14
-60
wined3d.spec
dlls/wined3d/wined3d.spec
+5
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-2
wined3d.idl
include/wine/wined3d.idl
+8
-14
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
2ab5b833
...
...
@@ -134,7 +134,7 @@ struct d3d10_rendertarget_view
const
struct
ID3D10RenderTargetViewVtbl
*
vtbl
;
LONG
refcount
;
IWineD3DRendertargetV
iew
*
wined3d_view
;
struct
wined3d_rendertarget_v
iew
*
wined3d_view
;
D3D10_RENDER_TARGET_VIEW_DESC
desc
;
};
...
...
dlls/d3d10core/device.c
View file @
2ab5b833
...
...
@@ -372,12 +372,13 @@ static void STDMETHODCALLTYPE d3d10_device_ClearRenderTargetView(ID3D10Device *i
ID3D10RenderTargetView
*
render_target_view
,
const
FLOAT
color_rgba
[
4
])
{
struct
d3d10_device
*
This
=
(
struct
d3d10_device
*
)
iface
;
IWineD3DRendertargetView
*
wined3d_view
=
((
struct
d3d10_rendertarget_view
*
)
render_target_view
)
->
wined3d_view
;
struct
wined3d_rendertarget_view
*
wined3d_view
;
const
WINED3DCOLORVALUE
color
=
{
color_rgba
[
0
],
color_rgba
[
1
],
color_rgba
[
2
],
color_rgba
[
3
]};
TRACE
(
"iface %p, render_target_view %p, color_rgba [%f %f %f %f]
\n
"
,
iface
,
render_target_view
,
color_rgba
[
0
],
color_rgba
[
1
],
color_rgba
[
2
],
color_rgba
[
3
]);
wined3d_view
=
((
struct
d3d10_rendertarget_view
*
)
render_target_view
)
->
wined3d_view
;
IWineD3DDevice_ClearRendertargetView
(
This
->
wined3d_device
,
wined3d_view
,
&
color
);
}
...
...
dlls/d3d10core/view.c
View file @
2ab5b833
...
...
@@ -328,7 +328,7 @@ static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_Release(ID3D10RenderTarge
if
(
!
refcount
)
{
IWineD3DRendertargetView_Release
(
This
->
wined3d_view
);
wined3d_rendertarget_view_decref
(
This
->
wined3d_view
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -380,10 +380,10 @@ static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetResource(ID3D10RenderTa
TRACE
(
"iface %p, resource %p
\n
"
,
iface
,
resource
);
hr
=
IWineD3DRendertargetView_GetResource
(
This
->
wined3d_view
,
&
wined3d_resource
);
if
(
FAILED
(
hr
)
)
wined3d_resource
=
wined3d_rendertarget_view_get_resource
(
This
->
wined3d_view
);
if
(
!
wined3d_resource
)
{
ERR
(
"Failed to get wined3d resource
, hr %#x
\n
"
,
hr
);
ERR
(
"Failed to get wined3d resource
.
\n
"
);
*
resource
=
NULL
;
return
;
}
...
...
dlls/wined3d/device.c
View file @
2ab5b833
...
...
@@ -1089,7 +1089,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UI
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateRendertargetView
(
IWineD3DDevice
*
iface
,
struct
wined3d_resource
*
resource
,
void
*
parent
,
IWineD3DRendertargetV
iew
**
rendertarget_view
)
struct
wined3d_resource
*
resource
,
void
*
parent
,
struct
wined3d_rendertarget_v
iew
**
rendertarget_view
)
{
struct
wined3d_rendertarget_view
*
object
;
...
...
@@ -1106,7 +1106,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateRendertargetView(IWineD3DDevice *
wined3d_rendertarget_view_init
(
object
,
resource
,
parent
);
TRACE
(
"Created render target view %p.
\n
"
,
object
);
*
rendertarget_view
=
(
IWineD3DRendertargetView
*
)
object
;
*
rendertarget_view
=
object
;
return
WINED3D_OK
;
}
...
...
@@ -5776,18 +5776,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface,
/* Do not call while under the GL lock. */
static
void
WINAPI
IWineD3DDeviceImpl_ClearRendertargetView
(
IWineD3DDevice
*
iface
,
IWineD3DRendertargetV
iew
*
rendertarget_view
,
const
WINED3DCOLORVALUE
*
color
)
struct
wined3d_rendertarget_v
iew
*
rendertarget_view
,
const
WINED3DCOLORVALUE
*
color
)
{
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
hr
=
IWineD3DRendertargetView_GetResource
(
rendertarget_view
,
&
resource
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to get resource, hr %#x
\n
"
,
hr
);
return
;
}
resource
=
rendertarget_view
->
resource
;
if
(
resource
->
resourceType
!=
WINED3DRTYPE_SURFACE
)
{
FIXME
(
"Only supported on surface resources
\n
"
);
...
...
dlls/wined3d/view.c
View file @
2ab5b833
/*
* Copyright 2009 Henri Verbeet for CodeWeavers
* Copyright 2009
, 2011
Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -24,90 +24,44 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
rendertarget_view_QueryInterface
(
IWineD3DRendertargetView
*
iface
,
REFIID
riid
,
void
**
object
)
{
TRACE
(
"iface %p, riid %s, object %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_IWineD3DRendertargetView
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBase
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
IUnknown_AddRef
(
iface
);
*
object
=
iface
;
return
S_OK
;
}
WARN
(
"%s not implemented, returning E_NOINTERFACE
\n
"
,
debugstr_guid
(
riid
));
*
object
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
STDMETHODCALLTYPE
rendertarget_view_AddRef
(
IWineD3DRendertargetView
*
iface
)
ULONG
CDECL
wined3d_rendertarget_view_incref
(
struct
wined3d_rendertarget_view
*
view
)
{
struct
wined3d_rendertarget_view
*
This
=
(
struct
wined3d_rendertarget_view
*
)
iface
;
ULONG
refcount
=
InterlockedIncrement
(
&
This
->
refcount
);
ULONG
refcount
=
InterlockedIncrement
(
&
view
->
refcount
);
TRACE
(
"%p increasing refcount to %u
\n
"
,
This
,
refcount
);
TRACE
(
"%p increasing refcount to %u
.
\n
"
,
view
,
refcount
);
return
refcount
;
}
static
ULONG
STDMETHODCALLTYPE
rendertarget_view_Release
(
IWineD3DRendertargetView
*
iface
)
ULONG
CDECL
wined3d_rendertarget_view_decref
(
struct
wined3d_rendertarget_view
*
view
)
{
struct
wined3d_rendertarget_view
*
This
=
(
struct
wined3d_rendertarget_view
*
)
iface
;
ULONG
refcount
=
InterlockedDecrement
(
&
This
->
refcount
);
ULONG
refcount
=
InterlockedDecrement
(
&
view
->
refcount
);
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
TRACE
(
"%p decreasing refcount to %u
.
\n
"
,
view
,
refcount
);
if
(
!
refcount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
HeapFree
(
GetProcessHeap
(),
0
,
view
);
return
refcount
;
}
/* IWineD3DBase methods */
static
void
*
STDMETHODCALLTYPE
rendertarget_view_GetParent
(
IWineD3DRendertargetView
*
iface
)
void
*
CDECL
wined3d_rendertarget_view_get_parent
(
const
struct
wined3d_rendertarget_view
*
view
)
{
TRACE
(
"
iface %p.
\n
"
,
iface
);
TRACE
(
"
view %p.
\n
"
,
view
);
return
((
struct
wined3d_rendertarget_view
*
)
iface
)
->
parent
;
return
view
->
parent
;
}
/* IWineD3DRendertargetView methods */
static
HRESULT
STDMETHODCALLTYPE
rendertarget_view_GetResource
(
IWineD3DRendertargetView
*
iface
,
struct
wined3d_resource
**
resource
)
struct
wined3d_resource
*
CDECL
wined3d_rendertarget_view_get_resource
(
const
struct
wined3d_rendertarget_view
*
view
)
{
struct
wined3d_rendertarget_view
*
This
=
(
struct
wined3d_rendertarget_view
*
)
iface
;
TRACE
(
"view %p.
\n
"
,
view
)
;
*
resource
=
This
->
resource
;
return
WINED3D_OK
;
return
view
->
resource
;
}
static
const
struct
IWineD3DRendertargetViewVtbl
wined3d_rendertarget_view_vtbl
=
{
/* IUnknown methods */
rendertarget_view_QueryInterface
,
rendertarget_view_AddRef
,
rendertarget_view_Release
,
/* IWineD3DBase methods */
rendertarget_view_GetParent
,
/* IWineD3DRendertargetView methods */
rendertarget_view_GetResource
,
};
void
wined3d_rendertarget_view_init
(
struct
wined3d_rendertarget_view
*
view
,
struct
wined3d_resource
*
resource
,
void
*
parent
)
{
view
->
vtbl
=
&
wined3d_rendertarget_view_vtbl
;
view
->
refcount
=
1
;
view
->
resource
=
resource
;
view
->
parent
=
parent
;
...
...
dlls/wined3d/wined3d.spec
View file @
2ab5b833
...
...
@@ -61,6 +61,11 @@
@ cdecl wined3d_resource_get_desc(ptr ptr)
@ cdecl wined3d_resource_get_parent(ptr)
@ cdecl wined3d_rendertarget_view_decref(ptr)
@ cdecl wined3d_rendertarget_view_get_parent(ptr)
@ cdecl wined3d_rendertarget_view_get_resource(ptr)
@ cdecl wined3d_rendertarget_view_incref(ptr)
@ cdecl wined3d_shader_decref(ptr)
@ cdecl wined3d_shader_get_byte_code(ptr ptr ptr)
@ cdecl wined3d_shader_get_parent(ptr)
...
...
dlls/wined3d/wined3d_private.h
View file @
2ab5b833
...
...
@@ -2507,10 +2507,8 @@ HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device,
UINT
size
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
GLenum
bind_hint
,
const
char
*
data
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
/* IWineD3DRendertargetView */
struct
wined3d_rendertarget_view
{
const
struct
IWineD3DRendertargetViewVtbl
*
vtbl
;
LONG
refcount
;
struct
wined3d_resource
*
resource
;
...
...
include/wine/wined3d.idl
View file @
2ab5b833
...
...
@@ -2096,6 +2096,7 @@ struct wined3d_clipper;
struct
wined3d_palette
;
struct
wined3d_query
;
struct
wined3d_resource
;
struct
wined3d_rendertarget_view
;
struct
wined3d_shader
;
struct
wined3d_stateblock
;
struct
wined3d_texture
;
...
...
@@ -2210,18 +2211,6 @@ interface IWineD3DResource : IWineD3DBase
[
object
,
local
,
uuid
(
f7d8abf4
-
fb93
-
43
e4
-
9
c96
-
4618
cf9b3cbc
)
]
interface
IWineD3DRendertargetView
:
IWineD3DBase
{
HRESULT
GetResource
(
[
out
]
struct
wined3d_resource
**
resource
)
;
}
[
object
,
local
,
uuid
(
37
cd5526
-
6
f30
-
11
d9
-
c687
-
00046142
c14f
)
]
interface
IWineD3DSurface
:
IWineD3DResource
...
...
@@ -2438,7 +2427,7 @@ interface IWineD3DDevice : IUnknown
HRESULT
CreateRendertargetView
(
[
in
]
struct
wined3d_resource
*
resource
,
[
in
]
void
*
parent
,
[
out
]
IWineD3DRendertargetV
iew
**
rendertarget_view
[
out
]
struct
wined3d_rendertarget_v
iew
**
rendertarget_view
)
;
HRESULT
CreateTexture
(
[
in
]
UINT
width
,
...
...
@@ -2893,7 +2882,7 @@ interface IWineD3DDevice : IUnknown
[
in
]
DWORD
stencil
)
;
void
ClearRendertargetView
(
[
in
]
IWineD3DRendertargetV
iew
*
rendertarget_view
,
[
in
]
struct
wined3d_rendertarget_v
iew
*
rendertarget_view
,
[
in
]
const
WINED3DCOLORVALUE
*
color
)
;
void
SetPrimitiveType
(
...
...
@@ -3075,6 +3064,11 @@ void __cdecl wined3d_resource_get_desc(const struct wined3d_resource *resource,
struct
wined3d_resource_desc
*
desc
)
;
void
*
__cdecl
wined3d_resource_get_parent
(
const
struct
wined3d_resource
*
resource
)
;
ULONG
__cdecl
wined3d_rendertarget_view_decref
(
struct
wined3d_rendertarget_view
*
view
)
;
void
*
__cdecl
wined3d_rendertarget_view_get_parent
(
const
struct
wined3d_rendertarget_view
*
view
)
;
struct
wined3d_resource
*
__cdecl
wined3d_rendertarget_view_get_resource
(
const
struct
wined3d_rendertarget_view
*
view
)
;
ULONG
__cdecl
wined3d_rendertarget_view_incref
(
struct
wined3d_rendertarget_view
*
view
)
;
ULONG
__cdecl
wined3d_shader_decref
(
struct
wined3d_shader
*
shader
)
;
HRESULT
__cdecl
wined3d_shader_get_byte_code
(
const
struct
wined3d_shader
*
shader
,
void
*
byte_code
,
UINT
*
byte_code_size
)
;
...
...
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