Henri Verbeet : wined3d: Get rid of last_device.
Alexandre Julliard
julliard at winehq.org
Thu Jul 23 09:59:44 CDT 2009
Module: wine
Branch: master
Commit: 9253bbcb05fcde7ba5132a85f4a2cdb05aeeffb2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9253bbcb05fcde7ba5132a85f4a2cdb05aeeffb2
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Jul 23 10:54:34 2009 +0200
wined3d: Get rid of last_device.
---
dlls/wined3d/context.c | 15 ---------------
dlls/wined3d/directx.c | 1 -
dlls/wined3d/wined3d_private.h | 1 -
3 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 2e50634..61173fb 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -29,19 +29,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
#define GLINFO_LOCATION (*gl_info)
-/* The last used device.
- *
- * If the application creates multiple devices and switches between them, ActivateContext has to
- * change the opengl context. This flag allows to keep track which device is active
- */
-static IWineD3DDeviceImpl *last_device;
static DWORD wined3d_context_tls_idx;
-void context_set_last_device(IWineD3DDeviceImpl *device)
-{
- last_device = device;
-}
-
/* FBO helper functions */
/* GL locking is done by the caller */
@@ -1193,7 +1182,6 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
}
LEAVE_GL();
- context_set_last_device(This);
This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE);
return ret;
@@ -1283,8 +1271,6 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context)
context_destroy_gl_resources(context);
destroy = TRUE;
- context_set_last_device(NULL);
-
if (This->activeContext == context)
{
This->activeContext = NULL;
@@ -1840,7 +1826,6 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
}
}
This->activeContext = context;
- context_set_last_device(This);
switch (usage) {
case CTXUSAGE_CLEAR:
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 9daffaa..e6fb1c7 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -284,7 +284,6 @@ static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
ERR_(d3d_caps)("Failed to make fake GL context current.\n");
goto fail;
}
- context_set_last_device(NULL);
return TRUE;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 363eb13..a28878e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1271,7 +1271,6 @@ void context_attach_depth_stencil_fbo(struct WineD3DContext *context,
GLenum fbo_target, IWineD3DSurface *depth_stencil, BOOL use_render_buffer);
void context_attach_surface_fbo(const struct WineD3DContext *context,
GLenum fbo_target, DWORD idx, IWineD3DSurface *surface);
-void context_set_last_device(IWineD3DDeviceImpl *device);
struct WineD3DContext *context_get_current(void);
DWORD context_get_tls_idx(void);
BOOL context_set_current(struct WineD3DContext *ctx);
More information about the wine-cvs
mailing list