[PATCH 3/5] wined3d: Get rid of some IWineD3D* references.

Henri Verbeet hverbeet at codeweavers.com
Sun Jul 3 15:27:21 CDT 2011


---
 dlls/wined3d/buffer.c    |   13 ++++++-------
 dlls/wined3d/clipper.c   |    3 +--
 dlls/wined3d/device.c    |    6 ++----
 dlls/wined3d/directx.c   |    6 ------
 dlls/wined3d/query.c     |    2 --
 dlls/wined3d/resource.c  |    2 --
 dlls/wined3d/surface.c   |    4 ++--
 dlls/wined3d/swapchain.c |    7 +++----
 8 files changed, 14 insertions(+), 29 deletions(-)

diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index ea94c7e..fa14f3a 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -119,7 +119,7 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc
 {
     GLenum error, gl_usage;
 
-    TRACE("Creating an OpenGL vertex buffer object for IWineD3DVertexBuffer %p Usage(%s)\n",
+    TRACE("Creating an OpenGL vertex buffer object for wined3d_buffer %p with usage %s.\n",
             This, debug_d3dusage(This->resource.usage));
 
     ENTER_GL();
@@ -131,12 +131,11 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc
     */
     while (glGetError() != GL_NO_ERROR);
 
-    /* Basically the FVF parameter passed to CreateVertexBuffer is no good
-     * It is the FVF set with IWineD3DDevice::SetFVF or the Vertex Declaration set with
-     * IWineD3DDevice::SetVertexDeclaration that decides how the vertices in the buffer
-     * look like. This means that on each DrawPrimitive call the vertex buffer has to be verified
-     * to check if the rhw and color values are in the correct format.
-     */
+    /* Basically the FVF parameter passed to CreateVertexBuffer is no good.
+     * The vertex declaration from the device determines how the data in the
+     * buffer is interpreted. This means that on each draw call the buffer has
+     * to be verified to check if the rhw and color values are in the correct
+     * format. */
 
     GL_EXTCALL(glGenBuffersARB(1, &This->buffer_object));
     error = glGetError();
diff --git a/dlls/wined3d/clipper.c b/dlls/wined3d/clipper.c
index e5131d7..0829cde 100644
--- a/dlls/wined3d/clipper.c
+++ b/dlls/wined3d/clipper.c
@@ -1,5 +1,4 @@
-/* IWineD3DClipper implementation
- *
+/*
  * Copyright 2000 (c) Marcus Meissner
  * Copyright 2000 (c) TransGaming Technologies Inc.
  * Copyright 2006 (c) Stefan Dösinger
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 180fd49..f3fceac 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1,6 +1,4 @@
 /*
- * IWineD3DDevice implementation
- *
  * Copyright 2002 Lionel Ulmer
  * Copyright 2002-2005 Jason Edmeades
  * Copyright 2003-2004 Raphael Junqueira
@@ -4377,7 +4375,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
                 hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL);
                 if (FAILED(hr))
                 {
-                    WARN("IWineD3DDevice_UpdateSurface failed, hr %#x.\n", hr);
+                    WARN("Failed to update surface, hr %#x.\n", hr);
                     return hr;
                 }
             }
@@ -4396,7 +4394,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
                 hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL);
                 if (FAILED(hr))
                 {
-                    WARN("IWineD3DDevice_UpdateSurface failed, hr %#x.\n", hr);
+                    WARN("Failed to update surface, hr %#x.\n", hr);
                     return hr;
                 }
             }
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index ce4a058..504cb2c 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1,6 +1,4 @@
 /*
- * IWineD3D implementation
- *
  * Copyright 2002-2004 Jason Edmeades
  * Copyright 2003-2004 Raphael Junqueira
  * Copyright 2004 Christian Costa
@@ -412,10 +410,6 @@ ULONG CDECL wined3d_decref(struct wined3d *wined3d)
     return refcount;
 }
 
-/**********************************************************
- * IWineD3D parts follows
- **********************************************************/
-
 /* GL locking is done by the caller */
 static inline BOOL test_arb_vs_offset_limit(const struct wined3d_gl_info *gl_info)
 {
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index ca4426f..2deb337 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -1,6 +1,4 @@
 /*
- * IWineD3DQuery implementation
- *
  * Copyright 2005 Oliver Stieber
  * Copyright 2007-2008 Stefan Dösinger for CodeWeavers
  * Copyright 2009-2010 Henri Verbeet for CodeWeavers.
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 699a61b..4dbe46e 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -1,6 +1,4 @@
 /*
- * IWineD3DResource Implementation
- *
  * Copyright 2002-2004 Jason Edmeades
  * Copyright 2003-2004 Raphael Junqueira
  * Copyright 2004 Christian Costa
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 114be69..5fb667d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5281,8 +5281,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa
          * This path will only be entered for d3d7 and ddraw apps, because d3d8/9 offer no way to blit TO the front buffer
          */
 
-        /* Check rects - IWineD3DDevice_Present doesn't handle them */
-        while(1)
+        /* Check rects - wined3d_swapchain_present() doesn't handle them. */
+        for (;;)
         {
             TRACE("Looking if a Present can be done...\n");
             /* Source Rectangle must be full surface */
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index a64c0db..2242f66 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -351,9 +351,8 @@ static void swapchain_blit(struct wined3d_swapchain *swapchain,
         ENTER_GL();
         context_bind_fbo(context2, GL_FRAMEBUFFER, NULL);
 
-        /* Set up the texture. The surface is not in a IWineD3D*Texture container,
-         * so there are no d3d texture settings to dirtify
-         */
+        /* Set up the texture. The surface is not in a wined3d_texture
+         * container, so there are no D3D texture settings to dirtify. */
         device->blitter->set_shader(device->blit_priv, context2->gl_info, backbuffer);
         glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MIN_FILTER, gl_filter);
         glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MAG_FILTER, gl_filter);
@@ -693,7 +692,7 @@ void x11_copy_to_screen(struct wined3d_swapchain *swapchain, const RECT *rect)
     if (front->clipper)
     {
         RECT xrc;
-        HWND hwnd = ((IWineD3DClipperImpl *)front->clipper)->hWnd;
+        HWND hwnd = front->clipper->hWnd;
         if (hwnd && GetClientRect(hwnd,&xrc))
         {
             OffsetRect(&xrc, offset.x, offset.y);
-- 
1.7.3.4




More information about the wine-patches mailing list