wined3d: Get rid of the IWineD3DBase requirement for surface_set_container().
This made sense back when we needed the container's parent and didn't know the container's type, but neither of those is true anymore.
This commit is contained in:
parent
ae898e0bc3
commit
85f2348549
|
@ -457,7 +457,7 @@ HRESULT cubetexture_init(IWineD3DBaseTextureImpl *texture, UINT edge_length, UIN
|
|||
return hr;
|
||||
}
|
||||
|
||||
surface_set_container((IWineD3DSurfaceImpl *)surface, WINED3D_CONTAINER_TEXTURE, (IWineD3DBase *)texture);
|
||||
surface_set_container((IWineD3DSurfaceImpl *)surface, WINED3D_CONTAINER_TEXTURE, texture);
|
||||
surface_set_texture_target((IWineD3DSurfaceImpl *)surface, cube_targets[j]);
|
||||
texture->baseTexture.sub_resources[idx] = &((IWineD3DSurfaceImpl *)surface)->resource;
|
||||
TRACE("Created surface level %u @ %p.\n", i, surface);
|
||||
|
|
|
@ -92,7 +92,7 @@ static void surface_cleanup(IWineD3DSurfaceImpl *This)
|
|||
resource_cleanup(&This->resource);
|
||||
}
|
||||
|
||||
void surface_set_container(IWineD3DSurfaceImpl *surface, enum wined3d_container_type type, IWineD3DBase *container)
|
||||
void surface_set_container(IWineD3DSurfaceImpl *surface, enum wined3d_container_type type, void *container)
|
||||
{
|
||||
TRACE("surface %p, container %p.\n", surface, container);
|
||||
|
||||
|
|
|
@ -596,7 +596,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
|
|||
goto err;
|
||||
}
|
||||
|
||||
surface_set_container(swapchain->front_buffer, WINED3D_CONTAINER_SWAPCHAIN, (IWineD3DBase *)swapchain);
|
||||
surface_set_container(swapchain->front_buffer, WINED3D_CONTAINER_SWAPCHAIN, swapchain);
|
||||
if (surface_type == SURFACE_OPENGL)
|
||||
{
|
||||
surface_modify_location(swapchain->front_buffer, SFLAG_INDRAWABLE, TRUE);
|
||||
|
@ -711,7 +711,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
|
|||
goto err;
|
||||
}
|
||||
|
||||
surface_set_container(swapchain->back_buffers[i], WINED3D_CONTAINER_SWAPCHAIN, (IWineD3DBase *)swapchain);
|
||||
surface_set_container(swapchain->back_buffers[i], WINED3D_CONTAINER_SWAPCHAIN, swapchain);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -521,7 +521,7 @@ HRESULT texture_init(IWineD3DBaseTextureImpl *texture, UINT width, UINT height,
|
|||
return hr;
|
||||
}
|
||||
|
||||
surface_set_container((IWineD3DSurfaceImpl *)surface, WINED3D_CONTAINER_TEXTURE, (IWineD3DBase *)texture);
|
||||
surface_set_container((IWineD3DSurfaceImpl *)surface, WINED3D_CONTAINER_TEXTURE, texture);
|
||||
surface_set_texture_target((IWineD3DSurfaceImpl *)surface, texture->baseTexture.target);
|
||||
texture->baseTexture.sub_resources[i] = &((IWineD3DSurfaceImpl *)surface)->resource;
|
||||
TRACE("Created surface level %u @ %p.\n", i, surface);
|
||||
|
|
|
@ -2044,9 +2044,9 @@ struct wined3d_subresource_container
|
|||
enum wined3d_container_type type;
|
||||
union
|
||||
{
|
||||
struct IWineD3DBase *base;
|
||||
struct IWineD3DSwapChainImpl *swapchain;
|
||||
struct IWineD3DBaseTextureImpl *texture;
|
||||
void *base;
|
||||
} u;
|
||||
};
|
||||
|
||||
|
@ -2157,7 +2157,7 @@ void surface_prepare_texture(IWineD3DSurfaceImpl *surface,
|
|||
void surface_set_compatible_renderbuffer(IWineD3DSurfaceImpl *surface,
|
||||
unsigned int width, unsigned int height) DECLSPEC_HIDDEN;
|
||||
void surface_set_container(IWineD3DSurfaceImpl *surface,
|
||||
enum wined3d_container_type type, IWineD3DBase *container) DECLSPEC_HIDDEN;
|
||||
enum wined3d_container_type type, void *container) DECLSPEC_HIDDEN;
|
||||
void surface_set_texture_name(IWineD3DSurfaceImpl *surface, GLuint name, BOOL srgb_name) DECLSPEC_HIDDEN;
|
||||
void surface_set_texture_target(IWineD3DSurfaceImpl *surface, GLenum target) DECLSPEC_HIDDEN;
|
||||
void surface_translate_drawable_coords(IWineD3DSurfaceImpl *surface, HWND window, RECT *rect) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue