Commit b84d1ce5 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Clippers don't need parents.

parent 7c675b52
...@@ -309,7 +309,7 @@ HRESULT ddraw_clipper_init(IDirectDrawClipperImpl *clipper) ...@@ -309,7 +309,7 @@ HRESULT ddraw_clipper_init(IDirectDrawClipperImpl *clipper)
{ {
clipper->lpVtbl = &ddraw_clipper_vtbl; clipper->lpVtbl = &ddraw_clipper_vtbl;
clipper->ref = 1; clipper->ref = 1;
clipper->wineD3DClipper = pWineDirect3DCreateClipper((IUnknown *)clipper); clipper->wineD3DClipper = pWineDirect3DCreateClipper();
if (!clipper->wineD3DClipper) if (!clipper->wineD3DClipper)
{ {
WARN("Failed to create wined3d clipper.\n"); WARN("Failed to create wined3d clipper.\n");
......
...@@ -33,7 +33,6 @@ static HRESULT WINAPI IWineD3DClipperImpl_QueryInterface(IWineD3DClipper *iface, ...@@ -33,7 +33,6 @@ static HRESULT WINAPI IWineD3DClipperImpl_QueryInterface(IWineD3DClipper *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);
if (IsEqualGUID(riid, &IID_IWineD3DClipper) if (IsEqualGUID(riid, &IID_IWineD3DClipper)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IUnknown)) || IsEqualGUID(riid, &IID_IUnknown))
{ {
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
...@@ -72,16 +71,6 @@ static ULONG WINAPI IWineD3DClipperImpl_Release(IWineD3DClipper *iface) ...@@ -72,16 +71,6 @@ static ULONG WINAPI IWineD3DClipperImpl_Release(IWineD3DClipper *iface)
else return ref; else return ref;
} }
static HRESULT WINAPI IWineD3DClipperImpl_GetParent(IWineD3DClipper *iface, IUnknown **Parent)
{
IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface;
TRACE("(%p)->(%p)\n", This, Parent);
*Parent = This->Parent;
IUnknown_AddRef(*Parent);
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DClipperImpl_SetHwnd(IWineD3DClipper *iface, DWORD Flags, HWND hWnd) static HRESULT WINAPI IWineD3DClipperImpl_SetHwnd(IWineD3DClipper *iface, DWORD Flags, HWND hWnd)
{ {
IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface; IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface;
...@@ -176,7 +165,6 @@ static const IWineD3DClipperVtbl IWineD3DClipper_Vtbl = ...@@ -176,7 +165,6 @@ static const IWineD3DClipperVtbl IWineD3DClipper_Vtbl =
IWineD3DClipperImpl_QueryInterface, IWineD3DClipperImpl_QueryInterface,
IWineD3DClipperImpl_AddRef, IWineD3DClipperImpl_AddRef,
IWineD3DClipperImpl_Release, IWineD3DClipperImpl_Release,
IWineD3DClipperImpl_GetParent,
IWineD3DClipperImpl_GetClipList, IWineD3DClipperImpl_GetClipList,
IWineD3DClipperImpl_GetHwnd, IWineD3DClipperImpl_GetHwnd,
IWineD3DClipperImpl_IsClipListChanged, IWineD3DClipperImpl_IsClipListChanged,
...@@ -184,11 +172,12 @@ static const IWineD3DClipperVtbl IWineD3DClipper_Vtbl = ...@@ -184,11 +172,12 @@ static const IWineD3DClipperVtbl IWineD3DClipper_Vtbl =
IWineD3DClipperImpl_SetHwnd IWineD3DClipperImpl_SetHwnd
}; };
IWineD3DClipper* WINAPI WineDirect3DCreateClipper(IUnknown *Parent) IWineD3DClipper * WINAPI WineDirect3DCreateClipper(void)
{ {
IWineD3DClipperImpl *obj; IWineD3DClipperImpl *obj;
TRACE("Creating clipper, parent %p\n", Parent); TRACE("\n");
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*obj)); obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*obj));
if(!obj) if(!obj)
{ {
...@@ -197,7 +186,6 @@ IWineD3DClipper* WINAPI WineDirect3DCreateClipper(IUnknown *Parent) ...@@ -197,7 +186,6 @@ IWineD3DClipper* WINAPI WineDirect3DCreateClipper(IUnknown *Parent)
} }
obj->lpVtbl = &IWineD3DClipper_Vtbl; obj->lpVtbl = &IWineD3DClipper_Vtbl;
obj->Parent = Parent;
IWineD3DClipper_AddRef((IWineD3DClipper *)obj); IWineD3DClipper_AddRef((IWineD3DClipper *)obj);
return (IWineD3DClipper *) obj; return (IWineD3DClipper *) obj;
......
@ stdcall WineDirect3DCreate(long ptr) @ stdcall WineDirect3DCreate(long ptr)
@ stdcall WineDirect3DCreateClipper(ptr) @ stdcall WineDirect3DCreateClipper()
@ stdcall wined3d_mutex_lock() @ stdcall wined3d_mutex_lock()
@ stdcall wined3d_mutex_unlock() @ stdcall wined3d_mutex_unlock()
...@@ -2001,7 +2001,6 @@ typedef struct IWineD3DClipperImpl ...@@ -2001,7 +2001,6 @@ typedef struct IWineD3DClipperImpl
const IWineD3DClipperVtbl *lpVtbl; const IWineD3DClipperVtbl *lpVtbl;
LONG ref; LONG ref;
IUnknown *Parent;
HWND hWnd; HWND hWnd;
} IWineD3DClipperImpl; } IWineD3DClipperImpl;
......
...@@ -2344,7 +2344,7 @@ interface IWineD3DPalette : IWineD3DBase ...@@ -2344,7 +2344,7 @@ interface IWineD3DPalette : IWineD3DBase
local, local,
uuid(8f2bceb1-d338-488c-ab7f-0ec980bf5d2d) uuid(8f2bceb1-d338-488c-ab7f-0ec980bf5d2d)
] ]
interface IWineD3DClipper : IWineD3DBase interface IWineD3DClipper : IUnknown
{ {
HRESULT GetClipList( HRESULT GetClipList(
[in] const RECT *rect, [in] const RECT *rect,
...@@ -3389,6 +3389,6 @@ interface IWineD3DDevice : IUnknown ...@@ -3389,6 +3389,6 @@ interface IWineD3DDevice : IUnknown
} }
IWineD3D * __stdcall WineDirect3DCreate(UINT dxVersion, IUnknown *parent); IWineD3D * __stdcall WineDirect3DCreate(UINT dxVersion, IUnknown *parent);
IWineD3DClipper * __stdcall WineDirect3DCreateClipper(IUnknown *parent); IWineD3DClipper * __stdcall WineDirect3DCreateClipper(void);
void __stdcall wined3d_mutex_lock(void); void __stdcall wined3d_mutex_lock(void);
void __stdcall wined3d_mutex_unlock(void); void __stdcall wined3d_mutex_unlock(void);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment