Henri Verbeet : wined3d: Get rid of lastActiveRenderTarget in FindContext() .
Alexandre Julliard
julliard at winehq.org
Tue Jul 21 09:34:40 CDT 2009
Module: wine
Branch: master
Commit: 223b9d5c015e430a123a6387872ac4158efc3f96
URL: http://source.winehq.org/git/wine.git/?a=commit;h=223b9d5c015e430a123a6387872ac4158efc3f96
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Jul 21 11:51:10 2009 +0200
wined3d: Get rid of lastActiveRenderTarget in FindContext().
---
dlls/wined3d/context.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 78ef374..b92cc99 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1667,7 +1667,8 @@ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurf
* After that, the outer ActivateContext(which calls PreLoad) can activate the new
* target for the new thread
*/
- if (readTexture && This->lastActiveRenderTarget != target) {
+ if (readTexture && context->current_rt != target)
+ {
BOOL oldInDraw = This->isInDraw;
/* PreLoad requires a context to load the texture, thus it will call ActivateContext.
@@ -1679,15 +1680,15 @@ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurf
/* Do that before switching the context:
* Read the back buffer of the old drawable into the destination texture
*/
- if (((IWineD3DSurfaceImpl *)This->lastActiveRenderTarget)->texture_name_srgb)
+ if (((IWineD3DSurfaceImpl *)context->current_rt)->texture_name_srgb)
{
- surface_internal_preload(This->lastActiveRenderTarget, SRGB_BOTH);
+ surface_internal_preload(context->current_rt, SRGB_BOTH);
} else {
- surface_internal_preload(This->lastActiveRenderTarget, SRGB_RGB);
+ surface_internal_preload(context->current_rt, SRGB_RGB);
}
/* Assume that the drawable will be modified by some other things now */
- IWineD3DSurface_ModifyLocation(This->lastActiveRenderTarget, SFLAG_INDRAWABLE, FALSE);
+ IWineD3DSurface_ModifyLocation(context->current_rt, SFLAG_INDRAWABLE, FALSE);
This->isInDraw = oldInDraw;
}
More information about the wine-cvs
mailing list