diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 6b00120469..b926af0e1e 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -709,10 +709,12 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU /* Do that before switching the context: * Read the back buffer of the old drawable into the destination texture */ - IWineD3DSurface_SetPBufferState(This->lastActiveRenderTarget, TRUE /* inPBuffer */, FALSE /* inTexture */); + ((IWineD3DSurfaceImpl *) This->lastActiveRenderTarget)->Flags |= SFLAG_INPBUFFER; + ((IWineD3DSurfaceImpl *) This->lastActiveRenderTarget)->Flags &= ~SFLAG_INTEXTURE; IWineD3DSurface_AddDirtyRect(This->lastActiveRenderTarget, NULL); IWineD3DSurface_PreLoad(This->lastActiveRenderTarget); - IWineD3DSurface_SetPBufferState(This->lastActiveRenderTarget, FALSE /* inPBuffer */, FALSE /* inTexture */); + ((IWineD3DSurfaceImpl *) This->lastActiveRenderTarget)->Flags &= ~SFLAG_INPBUFFER; + ((IWineD3DSurfaceImpl *) This->lastActiveRenderTarget)->Flags &= ~SFLAG_INTEXTURE; } This->lastActiveRenderTarget = target; if(oldRenderOffscreen != This->render_offscreen && This->depth_copy_state != WINED3D_DCS_NO_COPY) { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index c4eefc97ce..772bdbb522 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2130,25 +2130,6 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *Mem) { return WINED3D_OK; } -/* TODO: replace this function with context management routines */ -HRESULT WINAPI IWineD3DSurfaceImpl_SetPBufferState(IWineD3DSurface *iface, BOOL inPBuffer, BOOL inTexture) { - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - - if(inPBuffer) { - This->Flags |= SFLAG_INPBUFFER; - } else { - This->Flags &= ~SFLAG_INPBUFFER; - } - - if(inTexture) { - This->Flags |= SFLAG_INTEXTURE; - } else { - This->Flags &= ~SFLAG_INTEXTURE; - } - - return WINED3D_OK; -} - static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DSurface *override, DWORD Flags) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; IWineD3DDevice *D3D = (IWineD3DDevice *) This->resource.wineD3DDevice; @@ -3261,7 +3242,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = IWineD3DSurfaceImpl_LoadTexture, IWineD3DSurfaceImpl_SaveSnapshot, IWineD3DSurfaceImpl_SetContainer, - IWineD3DSurfaceImpl_SetPBufferState, IWineD3DSurfaceImpl_SetGlTextureDesc, IWineD3DSurfaceImpl_GetGlDesc, IWineD3DSurfaceImpl_GetData, diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index 87ee0d0522..508aaae0d3 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -1605,7 +1605,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl = IWineGDISurfaceImpl_LoadTexture, IWineGDISurfaceImpl_SaveSnapshot, IWineD3DSurfaceImpl_SetContainer, - IWineD3DSurfaceImpl_SetPBufferState, IWineD3DSurfaceImpl_SetGlTextureDesc, IWineD3DSurfaceImpl_GetGlDesc, IWineD3DSurfaceImpl_GetData, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 7a8c4b82eb..ddb487ed04 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1082,7 +1082,6 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetColorKey(IWineD3DSurface *iface, DWORD Fla HRESULT WINAPI IWineD3DSurfaceImpl_CleanDirtyRect(IWineD3DSurface *iface); extern HRESULT WINAPI IWineD3DSurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, CONST RECT* pDirtyRect); HRESULT WINAPI IWineD3DSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWineD3DBase *container); -HRESULT WINAPI IWineD3DSurfaceImpl_SetPBufferState(IWineD3DSurface *iface, BOOL inPBuffer, BOOL inTexture); void WINAPI IWineD3DSurfaceImpl_SetGlTextureDesc(IWineD3DSurface *iface, UINT textureName, int target); void WINAPI IWineD3DSurfaceImpl_GetGlDesc(IWineD3DSurface *iface, glDescriptor **glDescription); const void *WINAPI IWineD3DSurfaceImpl_GetData(IWineD3DSurface *iface); diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 3783ebcda8..dfa5125db2 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -1113,7 +1113,6 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource) STDMETHOD(LoadTexture)(THIS) PURE; STDMETHOD(SaveSnapshot)(THIS_ const char *filename) PURE; STDMETHOD(SetContainer)(THIS_ IWineD3DBase *container) PURE; - STDMETHOD(SetPBufferState)(THIS_ BOOL inPBuffer, BOOL inTexture) PURE; STDMETHOD_(void,SetGlTextureDesc)(THIS_ UINT textureName, int target) PURE; STDMETHOD_(void,GetGlDesc)(THIS_ glDescriptor **glDescription) PURE; STDMETHOD_(CONST void *, GetData)(THIS) PURE; @@ -1168,7 +1167,6 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource) #define IWineD3DSurface_LoadTexture(p) (p)->lpVtbl->LoadTexture(p) #define IWineD3DSurface_SaveSnapshot(p,a) (p)->lpVtbl->SaveSnapshot(p,a) #define IWineD3DSurface_SetContainer(p,a) (p)->lpVtbl->SetContainer(p,a) -#define IWineD3DSurface_SetPBufferState(p,a,b) (p)->lpVtbl->SetPBufferState(p,a,b) #define IWineD3DSurface_SetGlTextureDesc(p,a,b) (p)->lpVtbl->SetGlTextureDesc(p,a,b) #define IWineD3DSurface_GetGlDesc(p,a) (p)->lpVtbl->GetGlDesc(p,a) #define IWineD3DSurface_GetData(p) (p)->lpVtbl->GetData(p)