wined3d: Get rid of the width and height parameters to surface_allocate_surface().
authorHenri Verbeet <hverbeet@codeweavers.com>
Thu, 15 Apr 2010 17:21:22 +0000 (19:21 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 16 Apr 2010 10:09:23 +0000 (12:09 +0200)
dlls/wined3d/surface.c

index 182e21900cb5fee69eb7061b3dfd8f7724808483..7c9553034545050aa5aa5d44c08bfc829b9090f2 100644 (file)
@@ -797,9 +797,11 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, const struct wined3d_
  * the correct texture. */
 /* Context activation is done by the caller. */
 static void surface_allocate_surface(IWineD3DSurfaceImpl *This, const struct wined3d_gl_info *gl_info,
-        const struct wined3d_format_desc *format_desc, BOOL srgb, GLsizei width, GLsizei height)
+        const struct wined3d_format_desc *format_desc, BOOL srgb)
 {
     BOOL enable_client_storage = FALSE;
+    GLsizei width = This->pow2Width;
+    GLsizei height = This->pow2Height;
     const BYTE *mem = NULL;
     GLenum internal;
 
@@ -1531,7 +1533,7 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
 
     if (!(This->Flags & alloc_flag))
     {
-        surface_allocate_surface(This, gl_info, This->resource.format_desc, srgb, This->pow2Width, This->pow2Height);
+        surface_allocate_surface(This, gl_info, This->resource.format_desc, srgb);
         This->Flags |= alloc_flag;
     }
 
@@ -1570,8 +1572,7 @@ void surface_prepare_texture(IWineD3DSurfaceImpl *surface, const struct wined3d_
     else surface->Flags &= ~SFLAG_CONVERTED;
 
     surface_bind_and_dirtify(surface, srgb);
-    surface_allocate_surface(surface, gl_info, &desc, srgb,
-            surface->pow2Width, surface->pow2Height);
+    surface_allocate_surface(surface, gl_info, &desc, srgb);
     surface->Flags |= alloc_flag;
 }