wined3d: Remove the useless lastThread field from IWineD3DDeviceImpl.

This commit is contained in:
Henri Verbeet 2009-07-21 11:51:12 +02:00 committed by Alexandre Julliard
parent 2d7500600b
commit c114b04016
3 changed files with 5 additions and 6 deletions

View File

@ -1551,7 +1551,8 @@ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurf
switch(wined3d_settings.offscreen_rendering_mode) {
case ORM_FBO:
/* FBOs do not need a different context. Stay with whatever context is active at the moment */
if(This->activeContext && tid == This->lastThread) {
if (This->activeContext && This->activeContext->tid == tid)
{
context = This->activeContext;
} else {
/* This may happen if the app jumps straight into offscreen rendering
@ -1600,7 +1601,8 @@ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurf
case ORM_BACKBUFFER:
/* Stay with the currently active context for back buffer rendering */
if(This->activeContext && tid == This->lastThread) {
if (This->activeContext && This->activeContext->tid == tid)
{
context = This->activeContext;
} else {
/* This may happen if the app jumps straight into offscreen rendering
@ -1763,12 +1765,11 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
if (!target) target = This->activeContext->current_rt;
if (This->activeContext->current_rt != target || tid != This->lastThread)
if (This->activeContext->current_rt != target || This->activeContext->tid != tid)
{
context = FindContext(This, target, tid);
context->draw_buffer_dirty = TRUE;
context->current_rt = target;
This->lastThread = tid;
} else {
/* Stick to the old context */
context = This->activeContext;

View File

@ -2165,7 +2165,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
}
IWineD3DSurface_AddRef(This->render_targets[0]);
This->activeContext = swapchain->context[0];
This->lastThread = GetCurrentThreadId();
/* Depth Stencil support */
This->stencilBufferTarget = This->auto_depth_stencil_buffer;

View File

@ -1584,7 +1584,6 @@ struct IWineD3DDeviceImpl
/* Context management */
WineD3DContext **contexts; /* Dynamic array containing pointers to context structures */
WineD3DContext *activeContext;
DWORD lastThread;
UINT numContexts;
WineD3DContext *pbufferContext; /* The context that has a pbuffer as drawable */
DWORD pbufferWidth, pbufferHeight; /* Size of the buffer drawable */