Commit f7760656 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Remove LoadLocation() from the public wined3d surface interface.

parent 147f24dd
......@@ -2016,7 +2016,7 @@ static void context_validate_onscreen_formats(IWineD3DDeviceImpl *device,
WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
IWineD3DSurface_LoadLocation((IWineD3DSurface *)context->current_rt, SFLAG_INTEXTURE, NULL);
surface_load_location(context->current_rt, SFLAG_INTEXTURE, NULL);
swapchain->render_to_fbo = TRUE;
context_set_render_offscreen(context, device->StateTable, TRUE);
}
......
......@@ -81,7 +81,7 @@ static void cubetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3
{
TRACE("Reloading surface %p because the d3d8/9 palette was changed.\n", surface);
/* TODO: This is not necessarily needed with hw palettized texture support. */
IWineD3DSurface_LoadLocation((IWineD3DSurface *)surface, SFLAG_INSYSMEM, NULL);
surface_load_location(surface, SFLAG_INSYSMEM, NULL);
/* Make sure the texture is reloaded because of the palette change,
* this kills performance though :( */
surface_modify_location(surface, SFLAG_INTEXTURE, FALSE);
......
......@@ -4446,7 +4446,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
if (Flags & WINED3DCLEAR_TARGET && !(target->Flags & SFLAG_INDRAWABLE))
{
if (!is_full_clear(target, &draw_rect, clear_rect))
IWineD3DSurface_LoadLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, NULL);
surface_load_location(target, SFLAG_INDRAWABLE, NULL);
}
context = context_acquire(This, target);
......@@ -5489,7 +5489,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surface,
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
struct wined3d_context *context;
if (rect) IWineD3DSurface_LoadLocation((IWineD3DSurface *)surface, SFLAG_INDRAWABLE, NULL);
if (rect) surface_load_location(surface, SFLAG_INDRAWABLE, NULL);
surface_modify_location(surface, SFLAG_INDRAWABLE, TRUE);
context = context_acquire(This, surface);
......@@ -5769,8 +5769,8 @@ void stretch_rect_fbo(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_surfa
/* Make sure the drawables are up-to-date. Note that loading the
* destination surface isn't strictly required if we overwrite the
* entire surface. */
IWineD3DSurface_LoadLocation((IWineD3DSurface *)src_surface, SFLAG_INDRAWABLE, NULL);
IWineD3DSurface_LoadLocation((IWineD3DSurface *)dst_surface, SFLAG_INDRAWABLE, NULL);
surface_load_location(src_surface, SFLAG_INDRAWABLE, NULL);
surface_load_location(dst_surface, SFLAG_INDRAWABLE, NULL);
if (!surface_is_offscreen(src_surface)) context = context_acquire(device, src_surface);
else if (!surface_is_offscreen(dst_surface)) context = context_acquire(device, dst_surface);
......
......@@ -586,7 +586,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
IWineD3DSurfaceImpl *target = This->render_targets[i];
if (target)
{
IWineD3DSurface_LoadLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, NULL);
surface_load_location(target, SFLAG_INDRAWABLE, NULL);
surface_modify_location(target, SFLAG_INDRAWABLE, TRUE);
}
}
......
......@@ -474,18 +474,6 @@ static HRESULT WINAPI IWineGDISurfaceImpl_SetMem(IWineD3DSurface *iface, void *M
return WINED3D_OK;
}
/***************************
*
***************************/
static HRESULT WINAPI IWineGDISurfaceImpl_LoadLocation(IWineD3DSurface *iface, DWORD flag, const RECT *rect) {
if(flag != SFLAG_INSYSMEM) {
ERR("GDI Surface requested to be copied to gl %s\n", flag == SFLAG_INTEXTURE ? "texture" : "drawable");
} else {
TRACE("Surface requested in surface memory\n");
}
return WINED3D_OK;
}
static WINED3DSURFTYPE WINAPI IWineGDISurfaceImpl_GetImplType(IWineD3DSurface *iface) {
return SURFACE_GDI;
}
......@@ -547,7 +535,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
IWineD3DBaseSurfaceImpl_GetData,
IWineD3DBaseSurfaceImpl_SetFormat,
IWineGDISurfaceImpl_PrivateSetup,
IWineGDISurfaceImpl_LoadLocation,
IWineGDISurfaceImpl_GetImplType,
IWineGDISurfaceImpl_DrawOverlay
};
......@@ -325,7 +325,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
*/
if (!This->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
IWineD3DSurface_LoadLocation((IWineD3DSurface *)This->back_buffers[0], SFLAG_INTEXTURE, NULL);
surface_load_location(This->back_buffers[0], SFLAG_INTEXTURE, NULL);
surface_modify_location(This->back_buffers[0], SFLAG_INDRAWABLE, FALSE);
This->render_to_fbo = TRUE;
......
......@@ -76,7 +76,7 @@ static void texture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRG
{
TRACE("Reloading surface because the d3d8/9 palette was changed.\n");
/* TODO: This is not necessarily needed with hw palettized texture support. */
IWineD3DSurface_LoadLocation((IWineD3DSurface *)surface, SFLAG_INSYSMEM, NULL);
surface_load_location(surface, SFLAG_INSYSMEM, NULL);
/* Make sure the texture is reloaded because of the palette change, this kills performance though :( */
surface_modify_location(surface, SFLAG_INTEXTURE, FALSE);
}
......
......@@ -2076,6 +2076,7 @@ void surface_internal_preload(IWineD3DSurfaceImpl *surface, enum WINED3DSRGB srg
BOOL surface_is_offscreen(IWineD3DSurfaceImpl *iface) DECLSPEC_HIDDEN;
void surface_load_ds_location(IWineD3DSurfaceImpl *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
HRESULT surface_load_location(IWineD3DSurfaceImpl *surface, DWORD flag, const RECT *rect) DECLSPEC_HIDDEN;
void surface_modify_ds_location(IWineD3DSurfaceImpl *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void surface_modify_location(IWineD3DSurfaceImpl *surface, DWORD flag, BOOL persistent) DECLSPEC_HIDDEN;
void surface_prepare_texture(IWineD3DSurfaceImpl *surface,
......
......@@ -2491,10 +2491,6 @@ interface IWineD3DSurface : IWineD3DResource
);
HRESULT PrivateSetup(
);
HRESULT LoadLocation(
[in] DWORD location,
[in] const RECT *rect
);
WINED3DSURFTYPE GetImplType(
);
HRESULT DrawOverlay(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment