wined3d: Remove IWineD3DSurface::SetPBufferState.
The method is removed because it does not really help with anything. It should not be exported from wined3d, there is no need for the other libs to call it. It does not help abstraction and code simplification in any way because it is very specific and the code calling it has to know what is happening in the surface to use this method.
This commit is contained in:
parent
33eefa24dc
commit
ebe274feed
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1605,7 +1605,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
|
|||
IWineGDISurfaceImpl_LoadTexture,
|
||||
IWineGDISurfaceImpl_SaveSnapshot,
|
||||
IWineD3DSurfaceImpl_SetContainer,
|
||||
IWineD3DSurfaceImpl_SetPBufferState,
|
||||
IWineD3DSurfaceImpl_SetGlTextureDesc,
|
||||
IWineD3DSurfaceImpl_GetGlDesc,
|
||||
IWineD3DSurfaceImpl_GetData,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue