Henri Verbeet : wined3d: Get rid of the wined3d_surface_bltfast() export.

Alexandre Julliard julliard at winehq.org
Tue Nov 1 13:23:16 CDT 2011


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Oct 31 19:48:11 2011 +0100

wined3d: Get rid of the wined3d_surface_bltfast() export.

---

 dlls/wined3d/surface.c         |   20 +++++---------------
 dlls/wined3d/swapchain.c       |    6 +++---
 dlls/wined3d/wined3d.spec      |    1 -
 dlls/wined3d/wined3d_private.h |    2 ++
 include/wine/wined3d.h         |    9 ---------
 5 files changed, 10 insertions(+), 28 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index c13fc26..4f4f331 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1816,14 +1816,13 @@ cpu:
 }
 
 /* Do not call while under the GL lock. */
-HRESULT CDECL wined3d_surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y,
-        struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD trans)
+HRESULT surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y,
+        struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags)
 {
     RECT src_rect, dst_rect;
-    DWORD flags = 0;
 
-    TRACE("dst_surface %p, dst_x %u, dst_y %u, src_surface %p, src_rect_in %s, trans %#x.\n",
-            dst_surface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect_in), trans);
+    TRACE("dst_surface %p, dst_x %u, dst_y %u, src_surface %p, src_rect_in %s, flags %#x.\n",
+            dst_surface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect_in), flags);
 
     surface_get_rect(src_surface, src_rect_in, &src_rect);
 
@@ -1832,15 +1831,6 @@ HRESULT CDECL wined3d_surface_bltfast(struct wined3d_surface *dst_surface, DWORD
     dst_rect.right = dst_x + src_rect.right - src_rect.left;
     dst_rect.bottom = dst_y + src_rect.bottom - src_rect.top;
 
-    if (trans & WINEDDBLTFAST_SRCCOLORKEY)
-        flags |= WINEDDBLT_KEYSRC;
-    if (trans & WINEDDBLTFAST_DESTCOLORKEY)
-        flags |= WINEDDBLT_KEYDEST;
-    if (trans & WINEDDBLTFAST_WAIT)
-        flags |= WINEDDBLT_WAIT;
-    if (trans & WINEDDBLTFAST_DONOTWAIT)
-        flags |= WINEDDBLT_DONOTWAIT;
-
     return wined3d_surface_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, NULL, WINED3DTEXF_POINT);
 }
 
@@ -2604,7 +2594,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
      * loading. */
     d3dfmt_get_conv(dst_surface, FALSE, TRUE, &format, &convert);
     if (convert != NO_CONVERSION || format.convert)
-        return wined3d_surface_bltfast(dst_surface, dst_point->x, dst_point->y, src_surface, src_rect, 0);
+        return surface_bltfast(dst_surface, dst_point->x, dst_point->y, src_surface, src_rect, 0);
 
     context = context_acquire(dst_surface->resource.device, NULL);
     gl_info = context->gl_info;
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 1678dce..7141165 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -161,7 +161,7 @@ HRESULT CDECL wined3d_swapchain_get_front_buffer_data(const struct wined3d_swapc
     if (swapchain->presentParms.Windowed)
         MapWindowPoints(swapchain->win_handle, NULL, &offset, 1);
 
-    wined3d_surface_bltfast(dst_surface, offset.x, offset.y, swapchain->front_buffer, NULL, 0);
+    surface_bltfast(dst_surface, offset.x, offset.y, swapchain->front_buffer, NULL, 0);
 
     return WINED3D_OK;
 }
@@ -476,8 +476,8 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
     if (swapchain->device->logo_surface)
     {
         /* Blit the logo into the upper left corner of the drawable. */
-        wined3d_surface_bltfast(swapchain->back_buffers[0], 0, 0,
-                swapchain->device->logo_surface, NULL, WINEDDBLTFAST_SRCCOLORKEY);
+        surface_bltfast(swapchain->back_buffers[0], 0, 0,
+                swapchain->device->logo_surface, NULL, WINEDDBLT_KEYSRC);
     }
 
     TRACE("Presenting HDC %p.\n", context->hdc);
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 9cac395..1befb128 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -200,7 +200,6 @@
 @ cdecl wined3d_stateblock_incref(ptr)
 
 @ cdecl wined3d_surface_blt(ptr ptr ptr ptr long ptr long)
-@ cdecl wined3d_surface_bltfast(ptr long long ptr ptr long)
 @ cdecl wined3d_surface_create(ptr long long long long long long long long long long long ptr ptr ptr)
 @ cdecl wined3d_surface_decref(ptr)
 @ cdecl wined3d_surface_flip(ptr ptr long)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1a08c5b..168e021 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2079,6 +2079,8 @@ static inline GLuint surface_get_texture_name(const struct wined3d_surface *surf
 
 void surface_add_dirty_rect(struct wined3d_surface *surface, const WINED3DBOX *dirty_rect) DECLSPEC_HIDDEN;
 void surface_bind(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
+HRESULT surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y,
+        struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags) DECLSPEC_HIDDEN;
 HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const WINED3DCOLORVALUE *color) DECLSPEC_HIDDEN;
 GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
 BOOL surface_init_sysmem(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index a67949b..a921f87 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -1285,13 +1285,6 @@ enum wined3d_sysval_semantic
 #define WINEDDBLT_DEPTHFILL                                     0x02000000
 #define WINEDDBLT_DONOTWAIT                                     0x08000000
 
-/* dwTrans for BltFast */
-#define WINEDDBLTFAST_NOCOLORKEY                                0x00000000
-#define WINEDDBLTFAST_SRCCOLORKEY                               0x00000001
-#define WINEDDBLTFAST_DESTCOLORKEY                              0x00000002
-#define WINEDDBLTFAST_WAIT                                      0x00000010
-#define WINEDDBLTFAST_DONOTWAIT                                 0x00000020
-
 /* DDSURFACEDESC.dwFlags */
 #define WINEDDSD_CAPS                                           0x00000001
 #define WINEDDSD_HEIGHT                                         0x00000002
@@ -2412,8 +2405,6 @@ ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock);
 HRESULT __cdecl wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
         struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
         const WINEDDBLTFX *blt_fx, WINED3DTEXTUREFILTERTYPE filter);
-HRESULT __cdecl wined3d_surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y,
-        struct wined3d_surface *src_surface, const RECT *src_rect, DWORD trans);
 HRESULT __cdecl wined3d_surface_create(struct wined3d_device *device, UINT width, UINT height,
         enum wined3d_format_id format_id, BOOL lockable, BOOL discard, UINT level, DWORD usage, WINED3DPOOL pool,
         WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, WINED3DSURFTYPE surface_type,




More information about the wine-cvs mailing list