Henri Verbeet : wined3d: Pass an IWineD3DDeviceImpl pointer to alloc_private().

Alexandre Julliard julliard at winehq.org
Thu Dec 9 12:26:23 CST 2010


Module: wine
Branch: master
Commit: 4ba3b64c576302e7391902e85dac0dcbd3618d7b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4ba3b64c576302e7391902e85dac0dcbd3618d7b

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Dec  8 18:28:10 2010 +0100

wined3d: Pass an IWineD3DDeviceImpl pointer to alloc_private().

---

 dlls/wined3d/arb_program_shader.c |    4 ++--
 dlls/wined3d/device.c             |    4 ++--
 dlls/wined3d/surface.c            |    4 ++--
 dlls/wined3d/wined3d_private.h    |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index e3b6e5d..eb0056f 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -6503,8 +6503,8 @@ struct arbfp_blit_priv {
     GLuint palette_texture;
 };
 
-static HRESULT arbfp_blit_alloc(IWineD3DDevice *iface) {
-    IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface;
+static HRESULT arbfp_blit_alloc(IWineD3DDeviceImpl *device)
+{
     device->blit_priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct arbfp_blit_priv));
     if(!device->blit_priv) {
         ERR("Out of memory\n");
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ec50693..53b0c36 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1973,7 +1973,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
         TRACE("Fragment pipeline private data couldn't be allocated\n");
         goto err_out;
     }
-    hr = This->blitter->alloc_private(iface);
+    hr = This->blitter->alloc_private(This);
     if(FAILED(hr)) {
         TRACE("Blitter private data couldn't be allocated\n");
         goto err_out;
@@ -6259,7 +6259,7 @@ static HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwap
         goto err;
     }
 
-    hr = This->blitter->alloc_private(iface);
+    hr = This->blitter->alloc_private(This);
     if (FAILED(hr))
     {
         ERR("Failed to allocate blitter private data, hr %#x.\n", hr);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e10ed0c..05ce89b 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4732,7 +4732,7 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
     IWineD3DSurfaceImpl_DrawOverlay
 };
 
-static HRESULT ffp_blit_alloc(IWineD3DDevice *iface) { return WINED3D_OK; }
+static HRESULT ffp_blit_alloc(IWineD3DDeviceImpl *device) { return WINED3D_OK; }
 /* Context activation is done by the caller. */
 static void ffp_blit_free(IWineD3DDevice *iface) { }
 
@@ -4865,7 +4865,7 @@ const struct blit_shader ffp_blit =  {
     ffp_blit_color_fill
 };
 
-static HRESULT cpu_blit_alloc(IWineD3DDevice *iface)
+static HRESULT cpu_blit_alloc(IWineD3DDeviceImpl *device)
 {
     return WINED3D_OK;
 }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ebcb4ea..a20a0ad 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1175,7 +1175,7 @@ enum blit_operation
  * already under the GL lock. */
 struct blit_shader
 {
-    HRESULT (*alloc_private)(IWineD3DDevice *iface);
+    HRESULT (*alloc_private)(IWineD3DDeviceImpl *device);
     void (*free_private)(IWineD3DDevice *iface);
     HRESULT (*set_shader)(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surface);
     void (*unset_shader)(IWineD3DDevice *iface);




More information about the wine-cvs mailing list