=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Remove wined3d_surface_get_palette.
Alexandre Julliard
julliard at winehq.org
Mon May 12 15:35:48 CDT 2014
Module: wine
Branch: master
Commit: fc25510fadf96eca3c8a6f40a7ac72232dca1536
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fc25510fadf96eca3c8a6f40a7ac72232dca1536
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Mon May 12 15:12:42 2014 +0200
wined3d: Remove wined3d_surface_get_palette.
---
dlls/ddraw/device.c | 2 +-
dlls/ddraw/surface.c | 14 +++++++-------
dlls/wined3d/surface.c | 7 -------
dlls/wined3d/wined3d.spec | 1 -
include/wine/wined3d.h | 1 -
5 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 2a5cce3..e184cfd 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -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,
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 349bbda..2efc98c 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -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 */
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 1111df2..b671a0d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -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;
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 99cf6bf..41b3158 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -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)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 56bedce..db36fbf 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -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);
More information about the wine-cvs
mailing list