wined3d: Remove wined3d_surface_get_palette.

This commit is contained in:
Stefan Dösinger 2014-05-12 15:12:42 +02:00 committed by Alexandre Julliard
parent 46df06aae7
commit fc25510fad
5 changed files with 8 additions and 17 deletions

View File

@ -1802,7 +1802,7 @@ static BOOL validate_surface_palette(struct ddraw_surface *surface)
& (DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2
| DDPF_PALETTEINDEXED4 | DDPF_PALETTEINDEXED8
| DDPF_PALETTEINDEXEDTO8))
|| wined3d_surface_get_palette(surface->wined3d_surface);
|| surface->palette;
}
static HRESULT d3d_device_set_render_target(struct d3d_device *device,

View File

@ -4982,7 +4982,7 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
for (;;)
{
struct wined3d_palette *wined3d_dst_pal, *wined3d_src_pal;
struct ddraw_palette *dst_pal, *src_pal;
DDSURFACEDESC *src_desc, *dst_desc;
TRACE("Copying surface %p to surface %p (mipmap level %d).\n",
@ -4992,20 +4992,20 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
dst_surface->surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
/* Get the palettes */
wined3d_dst_pal = wined3d_surface_get_palette(dst_surface->wined3d_surface);
wined3d_src_pal = wined3d_surface_get_palette(src_surface->wined3d_surface);
dst_pal = dst_surface->palette;
src_pal = src_surface->palette;
if (wined3d_src_pal)
if (src_pal)
{
PALETTEENTRY palent[256];
if (!wined3d_dst_pal)
if (!dst_pal)
{
wined3d_mutex_unlock();
return DDERR_NOPALETTEATTACHED;
}
wined3d_palette_get_entries(wined3d_src_pal, 0, 0, 256, palent);
wined3d_palette_set_entries(wined3d_dst_pal, 0, 0, 256, palent);
IDirectDrawPalette_GetEntries(&src_pal->IDirectDrawPalette_iface, 0, 0, 256, palent);
IDirectDrawPalette_SetEntries(&dst_pal->IDirectDrawPalette_iface, 0, 0, 256, palent);
}
/* Copy one surface on the other */

View File

@ -2381,13 +2381,6 @@ void CDECL wined3d_surface_set_palette(struct wined3d_surface *surface, struct w
surface->surface_ops->surface_realize_palette(surface);
}
struct wined3d_palette * CDECL wined3d_surface_get_palette(const struct wined3d_surface *surface)
{
TRACE("surface %p.\n", surface);
return surface->palette;
}
DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
{
unsigned int alignment;

View File

@ -207,7 +207,6 @@
@ cdecl wined3d_surface_get_blt_status(ptr long)
@ cdecl wined3d_surface_get_flip_status(ptr long)
@ cdecl wined3d_surface_get_overlay_position(ptr ptr ptr)
@ cdecl wined3d_surface_get_palette(ptr)
@ cdecl wined3d_surface_get_parent(ptr)
@ cdecl wined3d_surface_get_pitch(ptr)
@ cdecl wined3d_surface_get_priority(ptr)

View File

@ -2397,7 +2397,6 @@ struct wined3d_surface * __cdecl wined3d_surface_from_resource(struct wined3d_re
HRESULT __cdecl wined3d_surface_get_blt_status(const struct wined3d_surface *surface, DWORD flags);
HRESULT __cdecl wined3d_surface_get_flip_status(const struct wined3d_surface *surface, DWORD flags);
HRESULT __cdecl wined3d_surface_get_overlay_position(const struct wined3d_surface *surface, LONG *x, LONG *y);
struct wined3d_palette * __cdecl wined3d_surface_get_palette(const struct wined3d_surface *surface);
void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface);
DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface);
DWORD __cdecl wined3d_surface_get_priority(const struct wined3d_surface *surface);