diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 1aeea95208c..bf379cabd01 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4891,10 +4891,6 @@ HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RE return WINED3D_OK; } -static WINED3DSURFTYPE WINAPI IWineD3DSurfaceImpl_GetImplType(IWineD3DSurface *iface) { - return SURFACE_OPENGL; -} - BOOL surface_is_offscreen(IWineD3DSurfaceImpl *surface) { struct wined3d_swapchain *swapchain = surface->container.u.swapchain; @@ -4952,7 +4948,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = /* Internal use: */ IWineD3DSurfaceImpl_SetFormat, IWineD3DSurfaceImpl_PrivateSetup, - IWineD3DSurfaceImpl_GetImplType, }; static HRESULT ffp_blit_alloc(IWineD3DDeviceImpl *device) { return WINED3D_OK; } @@ -5539,11 +5534,6 @@ static HRESULT WINAPI IWineGDISurfaceImpl_SetMem(IWineD3DSurface *iface, void *m return WINED3D_OK; } -static WINED3DSURFTYPE WINAPI IWineGDISurfaceImpl_GetImplType(IWineD3DSurface *iface) -{ - return SURFACE_GDI; -} - static const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl = { /* IUnknown */ @@ -5586,7 +5576,6 @@ static const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl = /* Internal use: */ IWineD3DBaseSurfaceImpl_SetFormat, IWineGDISurfaceImpl_PrivateSetup, - IWineGDISurfaceImpl_GetImplType, }; HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, UINT alignment, @@ -5650,6 +5639,8 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, if (!resource_size) return WINED3DERR_INVALIDCALL; + surface->surface_type = surface_type; + /* Look at the implementation and set the correct Vtable. */ switch (surface_type) { diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index 07057190364..6bd073d3a49 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -899,8 +899,7 @@ static IWineD3DSurfaceImpl *surface_convert_format(IWineD3DSurfaceImpl *source, IWineD3DDevice_CreateSurface((IWineD3DDevice *)source->resource.device, source->resource.width, source->resource.height, to_fmt, TRUE /* lockable */, TRUE /* discard */, 0 /* level */, 0 /* usage */, WINED3DPOOL_SCRATCH, WINED3DMULTISAMPLE_NONE /* TODO: Multisampled conversion */, - 0 /* MultiSampleQuality */, IWineD3DSurface_GetImplType((IWineD3DSurface *) source), - NULL /* parent */, &wined3d_null_parent_ops, &ret); + 0 /* MultiSampleQuality */, source->surface_type, NULL /* parent */, &wined3d_null_parent_ops, &ret); if(!ret) { ERR("Failed to create a destination surface for conversion\n"); return NULL; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 416082c7bcf..8c904645258 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2041,6 +2041,7 @@ struct IWineD3DSurfaceImpl DWORD flags; + WINED3DSURFTYPE surface_type; UINT pow2Width; UINT pow2Height; diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index 82f5f76a463..422551d4bda 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -2285,8 +2285,6 @@ interface IWineD3DSurface : IUnknown ); HRESULT PrivateSetup( ); - WINED3DSURFTYPE GetImplType( - ); } [