ReactOS 0.4.15-dev-8131-g4988de4
surface.c File Reference
#include "config.h"
#include "wine/port.h"
#include "ddraw_private.h"
Include dependency graph for surface.c:

Go to the source code of this file.

Classes

struct  callback_info2
 
struct  callback_info
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ddraw)
 
static struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface2 (IDirectDrawSurface2 *iface)
 
static struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface3 (IDirectDrawSurface3 *iface)
 
static struct ddraw_surfaceimpl_from_IDirectDrawGammaControl (IDirectDrawGammaControl *iface)
 
HRESULT ddraw_surface_update_frontbuffer (struct ddraw_surface *surface, const RECT *rect, BOOL read)
 
static HRESULT WINAPI ddraw_surface7_QueryInterface (IDirectDrawSurface7 *iface, REFIID riid, void **obj)
 
static HRESULT WINAPI ddraw_surface4_QueryInterface (IDirectDrawSurface4 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_surface3_QueryInterface (IDirectDrawSurface3 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_surface2_QueryInterface (IDirectDrawSurface2 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_surface1_QueryInterface (IDirectDrawSurface *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_gamma_control_QueryInterface (IDirectDrawGammaControl *iface, REFIID riid, void **object)
 
static HRESULT WINAPI d3d_texture2_QueryInterface (IDirect3DTexture2 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI d3d_texture1_QueryInterface (IDirect3DTexture *iface, REFIID riid, void **object)
 
static void ddraw_surface_add_iface (struct ddraw_surface *surface)
 
static ULONG WINAPI ddraw_surface7_AddRef (IDirectDrawSurface7 *iface)
 
static ULONG WINAPI ddraw_surface4_AddRef (IDirectDrawSurface4 *iface)
 
static ULONG WINAPI ddraw_surface3_AddRef (IDirectDrawSurface3 *iface)
 
static ULONG WINAPI ddraw_surface2_AddRef (IDirectDrawSurface2 *iface)
 
static ULONG WINAPI ddraw_surface1_AddRef (IDirectDrawSurface *iface)
 
static ULONG WINAPI ddraw_gamma_control_AddRef (IDirectDrawGammaControl *iface)
 
static ULONG WINAPI d3d_texture2_AddRef (IDirect3DTexture2 *iface)
 
static ULONG WINAPI d3d_texture1_AddRef (IDirect3DTexture *iface)
 
static HRESULT ddraw_surface_set_palette (struct ddraw_surface *surface, IDirectDrawPalette *palette)
 
static void ddraw_surface_cleanup (struct ddraw_surface *surface)
 
static ULONG ddraw_surface_release_iface (struct ddraw_surface *This)
 
static ULONG WINAPI ddraw_surface7_Release (IDirectDrawSurface7 *iface)
 
static ULONG WINAPI ddraw_surface4_Release (IDirectDrawSurface4 *iface)
 
static ULONG WINAPI ddraw_surface3_Release (IDirectDrawSurface3 *iface)
 
static ULONG WINAPI ddraw_surface2_Release (IDirectDrawSurface2 *iface)
 
static ULONG WINAPI ddraw_surface1_Release (IDirectDrawSurface *iface)
 
static ULONG WINAPI ddraw_gamma_control_Release (IDirectDrawGammaControl *iface)
 
static ULONG WINAPI d3d_texture2_Release (IDirect3DTexture2 *iface)
 
static ULONG WINAPI d3d_texture1_Release (IDirect3DTexture *iface)
 
static HRESULT WINAPI ddraw_surface7_GetAttachedSurface (IDirectDrawSurface7 *iface, DDSCAPS2 *Caps, IDirectDrawSurface7 **Surface)
 
static HRESULT WINAPI ddraw_surface4_GetAttachedSurface (IDirectDrawSurface4 *iface, DDSCAPS2 *caps, IDirectDrawSurface4 **attachment)
 
static HRESULT WINAPI ddraw_surface3_GetAttachedSurface (IDirectDrawSurface3 *iface, DDSCAPS *caps, IDirectDrawSurface3 **attachment)
 
static HRESULT WINAPI ddraw_surface2_GetAttachedSurface (IDirectDrawSurface2 *iface, DDSCAPS *caps, IDirectDrawSurface2 **attachment)
 
static HRESULT WINAPI ddraw_surface1_GetAttachedSurface (IDirectDrawSurface *iface, DDSCAPS *caps, IDirectDrawSurface **attachment)
 
static HRESULT surface_lock (struct ddraw_surface *surface, RECT *rect, DDSURFACEDESC2 *surface_desc, unsigned int surface_desc_size, DWORD flags, HANDLE h)
 
static BOOL surface_validate_lock_desc (struct ddraw_surface *surface, const DDSURFACEDESC *desc, unsigned int *size)
 
static HRESULT WINAPI ddraw_surface7_Lock (IDirectDrawSurface7 *iface, RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface4_Lock (IDirectDrawSurface4 *iface, RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface3_Lock (IDirectDrawSurface3 *iface, RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface2_Lock (IDirectDrawSurface2 *iface, RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface1_Lock (IDirectDrawSurface *iface, RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Unlock (IDirectDrawSurface7 *iface, RECT *pRect)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Unlock (IDirectDrawSurface4 *iface, RECT *pRect)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Unlock (IDirectDrawSurface3 *iface, void *data)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Unlock (IDirectDrawSurface2 *iface, void *data)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Unlock (IDirectDrawSurface *iface, void *data)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip (IDirectDrawSurface7 *iface, IDirectDrawSurface7 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Flip (IDirectDrawSurface4 *iface, IDirectDrawSurface4 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Flip (IDirectDrawSurface3 *iface, IDirectDrawSurface3 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Flip (IDirectDrawSurface2 *iface, IDirectDrawSurface2 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Flip (IDirectDrawSurface *iface, IDirectDrawSurface *src, DWORD flags)
 
static HRESULT ddraw_surface_blt (struct ddraw_surface *dst_surface, const RECT *dst_rect, struct ddraw_surface *src_surface, const RECT *src_rect, DWORD flags, DWORD fill_colour, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
 
static HRESULT ddraw_surface_blt_clipped (struct ddraw_surface *dst_surface, const RECT *dst_rect_in, struct ddraw_surface *src_surface, const RECT *src_rect_in, DWORD flags, DWORD fill_colour, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt (IDirectDrawSurface7 *iface, RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Blt (IDirectDrawSurface4 *iface, RECT *dst_rect, IDirectDrawSurface4 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Blt (IDirectDrawSurface3 *iface, RECT *dst_rect, IDirectDrawSurface3 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Blt (IDirectDrawSurface2 *iface, RECT *dst_rect, IDirectDrawSurface2 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Blt (IDirectDrawSurface *iface, RECT *dst_rect, IDirectDrawSurface *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT ddraw_surface_attach_surface (struct ddraw_surface *This, struct ddraw_surface *Surf)
 
static HRESULT WINAPI ddraw_surface7_AddAttachedSurface (IDirectDrawSurface7 *iface, IDirectDrawSurface7 *attachment)
 
static HRESULT WINAPI ddraw_surface4_AddAttachedSurface (IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
 
static HRESULT WINAPI ddraw_surface3_AddAttachedSurface (IDirectDrawSurface3 *iface, IDirectDrawSurface3 *attachment)
 
static HRESULT WINAPI ddraw_surface2_AddAttachedSurface (IDirectDrawSurface2 *iface, IDirectDrawSurface2 *attachment)
 
static HRESULT WINAPI ddraw_surface1_AddAttachedSurface (IDirectDrawSurface *iface, IDirectDrawSurface *attachment)
 
static HRESULT ddraw_surface_delete_attached_surface (struct ddraw_surface *surface, struct ddraw_surface *attachment, IUnknown *detach_iface)
 
static HRESULT WINAPI ddraw_surface7_DeleteAttachedSurface (IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *attachment)
 
static HRESULT WINAPI ddraw_surface4_DeleteAttachedSurface (IDirectDrawSurface4 *iface, DWORD flags, IDirectDrawSurface4 *attachment)
 
static HRESULT WINAPI ddraw_surface3_DeleteAttachedSurface (IDirectDrawSurface3 *iface, DWORD flags, IDirectDrawSurface3 *attachment)
 
static HRESULT WINAPI ddraw_surface2_DeleteAttachedSurface (IDirectDrawSurface2 *iface, DWORD flags, IDirectDrawSurface2 *attachment)
 
static HRESULT WINAPI ddraw_surface1_DeleteAttachedSurface (IDirectDrawSurface *iface, DWORD flags, IDirectDrawSurface *attachment)
 
static HRESULT WINAPI ddraw_surface7_AddOverlayDirtyRect (IDirectDrawSurface7 *iface, RECT *Rect)
 
static HRESULT WINAPI ddraw_surface4_AddOverlayDirtyRect (IDirectDrawSurface4 *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface3_AddOverlayDirtyRect (IDirectDrawSurface3 *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface2_AddOverlayDirtyRect (IDirectDrawSurface2 *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface1_AddOverlayDirtyRect (IDirectDrawSurface *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface7_GetDC (IDirectDrawSurface7 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface4_GetDC (IDirectDrawSurface4 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface3_GetDC (IDirectDrawSurface3 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface2_GetDC (IDirectDrawSurface2 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface1_GetDC (IDirectDrawSurface *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface7_ReleaseDC (IDirectDrawSurface7 *iface, HDC hdc)
 
static HRESULT WINAPI ddraw_surface4_ReleaseDC (IDirectDrawSurface4 *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface3_ReleaseDC (IDirectDrawSurface3 *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface2_ReleaseDC (IDirectDrawSurface2 *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface1_ReleaseDC (IDirectDrawSurface *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface7_GetCaps (IDirectDrawSurface7 *iface, DDSCAPS2 *Caps)
 
static HRESULT WINAPI ddraw_surface4_GetCaps (IDirectDrawSurface4 *iface, DDSCAPS2 *caps)
 
static HRESULT WINAPI ddraw_surface3_GetCaps (IDirectDrawSurface3 *iface, DDSCAPS *caps)
 
static HRESULT WINAPI ddraw_surface2_GetCaps (IDirectDrawSurface2 *iface, DDSCAPS *caps)
 
static HRESULT WINAPI ddraw_surface1_GetCaps (IDirectDrawSurface *iface, DDSCAPS *caps)
 
static HRESULT WINAPI ddraw_surface7_SetPriority (IDirectDrawSurface7 *iface, DWORD priority)
 
static HRESULT WINAPI ddraw_surface7_GetPriority (IDirectDrawSurface7 *iface, DWORD *priority)
 
static HRESULT WINAPI ddraw_surface7_SetPrivateData (IDirectDrawSurface7 *iface, REFGUID tag, void *data, DWORD size, DWORD flags)
 
static HRESULT WINAPI ddraw_surface4_SetPrivateData (IDirectDrawSurface4 *iface, REFGUID tag, void *data, DWORD size, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetPrivateData (IDirectDrawSurface7 *iface, REFGUID tag, void *data, DWORD *size)
 
static HRESULT WINAPI ddraw_surface4_GetPrivateData (IDirectDrawSurface4 *iface, REFGUID tag, void *data, DWORD *size)
 
static HRESULT WINAPI ddraw_surface7_FreePrivateData (IDirectDrawSurface7 *iface, REFGUID tag)
 
static HRESULT WINAPI ddraw_surface4_FreePrivateData (IDirectDrawSurface4 *iface, REFGUID tag)
 
static HRESULT WINAPI ddraw_surface7_PageLock (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_PageLock (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_PageLock (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_PageLock (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_PageUnlock (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_PageUnlock (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_PageUnlock (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_PageUnlock (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltBatch (IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_BltBatch (IDirectDrawSurface4 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_BltBatch (IDirectDrawSurface3 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltBatch (IDirectDrawSurface2 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltBatch (IDirectDrawSurface *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_EnumAttachedSurfaces (IDirectDrawSurface7 *iface, void *context, LPDDENUMSURFACESCALLBACK7 cb)
 
static HRESULT CALLBACK EnumCallback2 (IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
 
static HRESULT CALLBACK EnumCallback (IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
 
static HRESULT WINAPI ddraw_surface4_EnumAttachedSurfaces (IDirectDrawSurface4 *iface, void *context, LPDDENUMSURFACESCALLBACK2 callback)
 
static HRESULT WINAPI ddraw_surface3_EnumAttachedSurfaces (IDirectDrawSurface3 *iface, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface2_EnumAttachedSurfaces (IDirectDrawSurface2 *iface, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface1_EnumAttachedSurfaces (IDirectDrawSurface *iface, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface7_EnumOverlayZOrders (IDirectDrawSurface7 *iface, DWORD Flags, void *context, LPDDENUMSURFACESCALLBACK7 cb)
 
static HRESULT WINAPI ddraw_surface4_EnumOverlayZOrders (IDirectDrawSurface4 *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK2 callback)
 
static HRESULT WINAPI ddraw_surface3_EnumOverlayZOrders (IDirectDrawSurface3 *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface2_EnumOverlayZOrders (IDirectDrawSurface2 *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface1_EnumOverlayZOrders (IDirectDrawSurface *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface7_GetBltStatus (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_GetBltStatus (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_GetBltStatus (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_GetBltStatus (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface1_GetBltStatus (IDirectDrawSurface *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetColorKey (IDirectDrawSurface7 *iface, DWORD Flags, DDCOLORKEY *CKey)
 
static HRESULT WINAPI ddraw_surface4_GetColorKey (IDirectDrawSurface4 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface3_GetColorKey (IDirectDrawSurface3 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface2_GetColorKey (IDirectDrawSurface2 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface1_GetColorKey (IDirectDrawSurface *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface7_GetFlipStatus (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_GetFlipStatus (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_GetFlipStatus (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_GetFlipStatus (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface1_GetFlipStatus (IDirectDrawSurface *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetOverlayPosition (IDirectDrawSurface7 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface4_GetOverlayPosition (IDirectDrawSurface4 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface3_GetOverlayPosition (IDirectDrawSurface3 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface2_GetOverlayPosition (IDirectDrawSurface2 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface1_GetOverlayPosition (IDirectDrawSurface *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface7_GetPixelFormat (IDirectDrawSurface7 *iface, DDPIXELFORMAT *PixelFormat)
 
static HRESULT WINAPI ddraw_surface4_GetPixelFormat (IDirectDrawSurface4 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface3_GetPixelFormat (IDirectDrawSurface3 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface2_GetPixelFormat (IDirectDrawSurface2 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface1_GetPixelFormat (IDirectDrawSurface *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface7_GetSurfaceDesc (IDirectDrawSurface7 *iface, DDSURFACEDESC2 *DDSD)
 
static HRESULT WINAPI ddraw_surface4_GetSurfaceDesc (IDirectDrawSurface4 *iface, DDSURFACEDESC2 *DDSD)
 
static HRESULT WINAPI ddraw_surface3_GetSurfaceDesc (IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw_surface2_GetSurfaceDesc (IDirectDrawSurface2 *iface, DDSURFACEDESC *DDSD)
 
static HRESULT WINAPI ddraw_surface1_GetSurfaceDesc (IDirectDrawSurface *iface, DDSURFACEDESC *DDSD)
 
static HRESULT WINAPI ddraw_surface7_Initialize (IDirectDrawSurface7 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
 
static HRESULT WINAPI ddraw_surface4_Initialize (IDirectDrawSurface4 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
 
static HRESULT WINAPI ddraw_surface3_Initialize (IDirectDrawSurface3 *iface, IDirectDraw *ddraw, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw_surface2_Initialize (IDirectDrawSurface2 *iface, IDirectDraw *ddraw, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw_surface1_Initialize (IDirectDrawSurface *iface, IDirectDraw *ddraw, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI d3d_texture1_Initialize (IDirect3DTexture *iface, IDirect3DDevice *device, IDirectDrawSurface *surface)
 
static HRESULT WINAPI ddraw_surface7_IsLost (IDirectDrawSurface7 *iface)
 
static HRESULT WINAPI ddraw_surface4_IsLost (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddraw_surface3_IsLost (IDirectDrawSurface3 *iface)
 
static HRESULT WINAPI ddraw_surface2_IsLost (IDirectDrawSurface2 *iface)
 
static HRESULT WINAPI ddraw_surface1_IsLost (IDirectDrawSurface *iface)
 
static HRESULT WINAPI ddraw_surface7_Restore (IDirectDrawSurface7 *iface)
 
static HRESULT WINAPI ddraw_surface4_Restore (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddraw_surface3_Restore (IDirectDrawSurface3 *iface)
 
static HRESULT WINAPI ddraw_surface2_Restore (IDirectDrawSurface2 *iface)
 
static HRESULT WINAPI ddraw_surface1_Restore (IDirectDrawSurface *iface)
 
static HRESULT WINAPI ddraw_surface7_SetOverlayPosition (IDirectDrawSurface7 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface4_SetOverlayPosition (IDirectDrawSurface4 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface3_SetOverlayPosition (IDirectDrawSurface3 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface2_SetOverlayPosition (IDirectDrawSurface2 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface1_SetOverlayPosition (IDirectDrawSurface *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface7_UpdateOverlay (IDirectDrawSurface7 *iface, RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface4_UpdateOverlay (IDirectDrawSurface4 *iface, RECT *src_rect, IDirectDrawSurface4 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface3_UpdateOverlay (IDirectDrawSurface3 *iface, RECT *src_rect, IDirectDrawSurface3 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface2_UpdateOverlay (IDirectDrawSurface2 *iface, RECT *src_rect, IDirectDrawSurface2 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface1_UpdateOverlay (IDirectDrawSurface *iface, RECT *src_rect, IDirectDrawSurface *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface7_UpdateOverlayDisplay (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_UpdateOverlayDisplay (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_UpdateOverlayDisplay (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_UpdateOverlayDisplay (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface1_UpdateOverlayDisplay (IDirectDrawSurface *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_UpdateOverlayZOrder (IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *reference)
 
static HRESULT WINAPI ddraw_surface4_UpdateOverlayZOrder (IDirectDrawSurface4 *iface, DWORD flags, IDirectDrawSurface4 *reference)
 
static HRESULT WINAPI ddraw_surface3_UpdateOverlayZOrder (IDirectDrawSurface3 *iface, DWORD flags, IDirectDrawSurface3 *reference)
 
static HRESULT WINAPI ddraw_surface2_UpdateOverlayZOrder (IDirectDrawSurface2 *iface, DWORD flags, IDirectDrawSurface2 *reference)
 
static HRESULT WINAPI ddraw_surface1_UpdateOverlayZOrder (IDirectDrawSurface *iface, DWORD flags, IDirectDrawSurface *reference)
 
static HRESULT WINAPI ddraw_surface7_GetDDInterface (IDirectDrawSurface7 *iface, void **DD)
 
static HRESULT WINAPI ddraw_surface4_GetDDInterface (IDirectDrawSurface4 *iface, void **ddraw)
 
static HRESULT WINAPI ddraw_surface3_GetDDInterface (IDirectDrawSurface3 *iface, void **ddraw)
 
static HRESULT WINAPI ddraw_surface2_GetDDInterface (IDirectDrawSurface2 *iface, void **ddraw)
 
static HRESULT WINAPI ddraw_surface7_ChangeUniquenessValue (IDirectDrawSurface7 *iface)
 
static HRESULT WINAPI ddraw_surface4_ChangeUniquenessValue (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddraw_surface7_GetUniquenessValue (IDirectDrawSurface7 *iface, DWORD *pValue)
 
static HRESULT WINAPI ddraw_surface4_GetUniquenessValue (IDirectDrawSurface4 *iface, DWORD *pValue)
 
static HRESULT WINAPI ddraw_surface7_SetLOD (IDirectDrawSurface7 *iface, DWORD MaxLOD)
 
static HRESULT WINAPI ddraw_surface7_GetLOD (IDirectDrawSurface7 *iface, DWORD *MaxLOD)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast (IDirectDrawSurface7 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD trans)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_BltFast (IDirectDrawSurface4 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface4 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_BltFast (IDirectDrawSurface3 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface3 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltFast (IDirectDrawSurface2 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface2 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltFast (IDirectDrawSurface *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetClipper (IDirectDrawSurface7 *iface, IDirectDrawClipper **Clipper)
 
static HRESULT WINAPI ddraw_surface4_GetClipper (IDirectDrawSurface4 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface3_GetClipper (IDirectDrawSurface3 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface2_GetClipper (IDirectDrawSurface2 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface1_GetClipper (IDirectDrawSurface *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface7_SetClipper (IDirectDrawSurface7 *iface, IDirectDrawClipper *iclipper)
 
static HRESULT WINAPI ddraw_surface4_SetClipper (IDirectDrawSurface4 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface3_SetClipper (IDirectDrawSurface3 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface2_SetClipper (IDirectDrawSurface2 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface1_SetClipper (IDirectDrawSurface *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc (IDirectDrawSurface7 *iface, DDSURFACEDESC2 *DDSD, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_SetSurfaceDesc (IDirectDrawSurface4 *iface, DDSURFACEDESC2 *surface_desc, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_SetSurfaceDesc (IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetPalette (IDirectDrawSurface7 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface4_GetPalette (IDirectDrawSurface4 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface3_GetPalette (IDirectDrawSurface3 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface2_GetPalette (IDirectDrawSurface2 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface1_GetPalette (IDirectDrawSurface *iface, IDirectDrawPalette **palette)
 
static HRESULT ddraw_surface_set_color_key (struct ddraw_surface *surface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface7_SetColorKey (IDirectDrawSurface7 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface4_SetColorKey (IDirectDrawSurface4 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface3_SetColorKey (IDirectDrawSurface3 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface2_SetColorKey (IDirectDrawSurface2 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface1_SetColorKey (IDirectDrawSurface *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface7_SetPalette (IDirectDrawSurface7 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface4_SetPalette (IDirectDrawSurface4 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface3_SetPalette (IDirectDrawSurface3 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface2_SetPalette (IDirectDrawSurface2 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface1_SetPalette (IDirectDrawSurface *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp (IDirectDrawGammaControl *iface, DWORD flags, DDGAMMARAMP *gamma_ramp)
 
static HRESULT WINAPI ddraw_gamma_control_SetGammaRamp (IDirectDrawGammaControl *iface, DWORD flags, DDGAMMARAMP *gamma_ramp)
 
static HRESULT WINAPI d3d_texture2_PaletteChanged (IDirect3DTexture2 *iface, DWORD start, DWORD count)
 
static HRESULT WINAPI d3d_texture1_PaletteChanged (IDirect3DTexture *iface, DWORD start, DWORD count)
 
static HRESULT WINAPI d3d_texture1_Unload (IDirect3DTexture *iface)
 
static HRESULT WINAPI d3d_texture2_GetHandle (IDirect3DTexture2 *iface, IDirect3DDevice2 *device, D3DTEXTUREHANDLE *handle)
 
static HRESULT WINAPI d3d_texture1_GetHandle (IDirect3DTexture *iface, IDirect3DDevice *device, D3DTEXTUREHANDLE *handle)
 
static struct ddraw_surfaceget_sub_mimaplevel (struct ddraw_surface *surface)
 
static BOOL compare_format (DDPIXELFORMAT *format1, DDPIXELFORMAT *format2)
 
static HRESULT WINAPI d3d_texture2_Load (IDirect3DTexture2 *iface, IDirect3DTexture2 *src_texture)
 
static HRESULT WINAPI d3d_texture1_Load (IDirect3DTexture *iface, IDirect3DTexture *src_texture)
 
struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface7 (IDirectDrawSurface7 *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface4 (IDirectDrawSurface4 *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface (IDirectDrawSurface *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirect3DTexture2 (IDirect3DTexture2 *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirect3DTexture (IDirect3DTexture *iface)
 
static void STDMETHODCALLTYPE ddraw_surface_wined3d_object_destroyed (void *parent)
 
static void STDMETHODCALLTYPE ddraw_texture_wined3d_object_destroyed (void *parent)
 
static HRESULT CDECL ddraw_reset_enum_callback (struct wined3d_resource *resource)
 
HRESULT ddraw_surface_create (struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc, struct ddraw_surface **surface, IUnknown *outer_unknown, unsigned int version)
 
void ddraw_surface_init (struct ddraw_surface *surface, struct ddraw *ddraw, struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, const struct wined3d_parent_ops **parent_ops)
 
static void STDMETHODCALLTYPE view_wined3d_object_destroyed (void *parent)
 
struct wined3d_rendertarget_viewddraw_surface_get_rendertarget_view (struct ddraw_surface *surface)
 

Variables

static const struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl
 
static const struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl
 
static const struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl
 
static const struct IDirectDrawSurface2Vtbl ddraw_surface2_vtbl
 
static struct IDirectDrawSurfaceVtbl ddraw_surface1_vtbl
 
static const struct IDirectDrawGammaControlVtbl ddraw_gamma_control_vtbl
 
static const struct IDirect3DTexture2Vtbl d3d_texture2_vtbl
 
static const struct IDirect3DTextureVtbl d3d_texture1_vtbl
 
static const struct wined3d_parent_ops ddraw_surface_wined3d_parent_ops
 
static const struct wined3d_parent_ops ddraw_texture_wined3d_parent_ops
 
static const struct wined3d_parent_ops ddraw_view_wined3d_parent_ops
 

Function Documentation

◆ compare_format()

static BOOL compare_format ( DDPIXELFORMAT format1,
DDPIXELFORMAT format2 
)
static

Definition at line 5192 of file surface.c.

5193{
5194 if ((format1->dwFlags & (DDPF_RGB|DDPF_YUV|DDPF_FOURCC)) !=
5195 (format2->dwFlags & (DDPF_RGB|DDPF_YUV|DDPF_FOURCC)))
5196 return FALSE;
5197
5198 if (format1->dwFlags & (DDPF_RGB|DDPF_YUV))
5199 {
5200 if (!(format1->dwFlags & DDPF_ALPHA))
5201 {
5202 /* The RGB and YUV bits are stored in the same fields */
5203 if (format1->u1.dwRGBBitCount != format2->u1.dwRGBBitCount)
5204 return FALSE;
5205
5206 if (format1->u2.dwRBitMask != format2->u2.dwRBitMask)
5207 return FALSE;
5208
5209 if (format1->u3.dwGBitMask != format2->u3.dwGBitMask)
5210 return FALSE;
5211
5212 if (format1->u4.dwBBitMask != format2->u4.dwBBitMask)
5213 return FALSE;
5214 }
5215
5216 if (format1->dwFlags & (DDPF_ALPHAPIXELS | DDPF_ALPHA))
5217 {
5218 if (format1->u5.dwRGBAlphaBitMask != format2->u5.dwRGBAlphaBitMask)
5219 return FALSE;
5220 }
5221 }
5222
5223 if (format1->dwFlags & DDPF_FOURCC)
5224 {
5225 if (format1->dwFourCC != format2->dwFourCC)
5226 return FALSE;
5227 }
5228
5229 return TRUE;
5230}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define DDPF_ALPHA
Definition: ddraw.h:502
#define DDPF_YUV
Definition: ddraw.h:510
#define DDPF_FOURCC
Definition: ddraw.h:503
#define DDPF_RGB
Definition: ddraw.h:507
#define DDPF_ALPHAPIXELS
Definition: ddraw.h:501
DWORD dwBBitMask
Definition: ddraw.h:1106
DWORD dwFourCC
Definition: ddraw.h:1072
DWORD dwRGBBitCount
Definition: ddraw.h:1075
DWORD dwRBitMask
Definition: ddraw.h:1085
DWORD dwGBitMask
Definition: ddraw.h:1094
DWORD dwFlags
Definition: ddraw.h:1071
DWORD dwRGBAlphaBitMask
Definition: ddraw.h:1113

Referenced by d3d_texture2_Load().

◆ d3d_texture1_AddRef()

static ULONG WINAPI d3d_texture1_AddRef ( IDirect3DTexture *  iface)
static

Definition at line 440 of file surface.c.

441{
442 struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
443
444 TRACE("iface %p.\n", iface);
445
446 return IUnknown_AddRef(surface->texture_outer);
447}
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IUnknown * texture_outer

◆ d3d_texture1_GetHandle()

static HRESULT WINAPI d3d_texture1_GetHandle ( IDirect3DTexture *  iface,
IDirect3DDevice *  device,
D3DTEXTUREHANDLE handle 
)
static

Definition at line 5157 of file surface.c.

5159{
5160 struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
5161 struct d3d_device *device_impl = unsafe_impl_from_IDirect3DDevice(device);
5162
5163 TRACE("iface %p, device %p, handle %p.\n", iface, device, handle);
5164
5166 device_impl ? &device_impl->IDirect3DDevice2_iface : NULL, handle);
5167}
struct d3d_device * unsafe_impl_from_IDirect3DDevice(IDirect3DDevice *iface) DECLSPEC_HIDDEN
Definition: device.c:6871
#define NULL
Definition: types.h:112
static HRESULT WINAPI d3d_texture2_GetHandle(IDirect3DTexture2 *iface, IDirect3DDevice2 *device, D3DTEXTUREHANDLE *handle)
Definition: surface.c:5126
IDirect3DDevice2 IDirect3DDevice2_iface
IDirect3DTexture2 IDirect3DTexture2_iface
Definition: devices.h:37

◆ d3d_texture1_Initialize()

static HRESULT WINAPI d3d_texture1_Initialize ( IDirect3DTexture *  iface,
IDirect3DDevice *  device,
IDirectDrawSurface *  surface 
)
static

Definition at line 3594 of file surface.c.

3596{
3597 TRACE("iface %p, device %p, surface %p.\n", iface, device, surface);
3598
3599 return DDERR_UNSUPPORTED; /* Unchecked */
3600}
#define DDERR_UNSUPPORTED
Definition: ddraw.h:127

◆ d3d_texture1_Load()

static HRESULT WINAPI d3d_texture1_Load ( IDirect3DTexture *  iface,
IDirect3DTexture *  src_texture 
)
static

Definition at line 5344 of file surface.c.

5345{
5346 struct ddraw_surface *dst_surface = impl_from_IDirect3DTexture(iface);
5347 struct ddraw_surface *src_surface = unsafe_impl_from_IDirect3DTexture(src_texture);
5348
5349 TRACE("iface %p, src_texture %p.\n", iface, src_texture);
5350
5351 return d3d_texture2_Load(&dst_surface->IDirect3DTexture2_iface,
5352 src_surface ? &src_surface->IDirect3DTexture2_iface : NULL);
5353}
static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTexture2 *src_texture)
Definition: surface.c:5249
struct ddraw_surface * unsafe_impl_from_IDirect3DTexture(IDirect3DTexture *iface)
Definition: surface.c:5728

◆ d3d_texture1_PaletteChanged()

static HRESULT WINAPI d3d_texture1_PaletteChanged ( IDirect3DTexture *  iface,
DWORD  start,
DWORD  count 
)
static

Definition at line 5087 of file surface.c.

5088{
5089 struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
5090
5091 TRACE("iface %p, start %u, count %u.\n", iface, start, count);
5092
5094}
static HRESULT WINAPI d3d_texture2_PaletteChanged(IDirect3DTexture2 *iface, DWORD start, DWORD count)
Definition: surface.c:5080
GLuint start
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545

◆ d3d_texture1_QueryInterface()

static HRESULT WINAPI d3d_texture1_QueryInterface ( IDirect3DTexture *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 306 of file surface.c.

307{
308 struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
309
310 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
311
313}
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:133
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ d3d_texture1_Release()

static ULONG WINAPI d3d_texture1_Release ( IDirect3DTexture *  iface)
static

Definition at line 700 of file surface.c.

701{
702 struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
703
704 TRACE("iface %p.\n", iface);
705
706 return IUnknown_Release(surface->texture_outer);
707}

◆ d3d_texture1_Unload()

static HRESULT WINAPI d3d_texture1_Unload ( IDirect3DTexture *  iface)
static

Definition at line 5106 of file surface.c.

5107{
5108 WARN("iface %p. Not implemented.\n", iface);
5109
5110 return DDERR_UNSUPPORTED;
5111}
#define WARN(fmt,...)
Definition: debug.h:115

◆ d3d_texture2_AddRef()

static ULONG WINAPI d3d_texture2_AddRef ( IDirect3DTexture2 *  iface)
static

Definition at line 431 of file surface.c.

432{
433 struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
434
435 TRACE("iface %p.\n", iface);
436
437 return IUnknown_AddRef(surface->texture_outer);
438}
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)

◆ d3d_texture2_GetHandle()

static HRESULT WINAPI d3d_texture2_GetHandle ( IDirect3DTexture2 *  iface,
IDirect3DDevice2 *  device,
D3DTEXTUREHANDLE handle 
)
static

Definition at line 5126 of file surface.c.

5128{
5129 struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
5131
5132 TRACE("iface %p, device %p, handle %p.\n", iface, device, handle);
5133
5135
5136 if (!surface->Handle)
5137 {
5139 if (h == DDRAW_INVALID_HANDLE)
5140 {
5141 ERR("Failed to allocate a texture handle.\n");
5143 return DDERR_OUTOFMEMORY;
5144 }
5145
5146 surface->Handle = h + 1;
5147 }
5148
5149 TRACE("Returning handle %08x.\n", surface->Handle);
5150 *handle = surface->Handle;
5151
5153
5154 return D3D_OK;
5155}
#define ERR(fmt,...)
Definition: debug.h:113
#define D3D_OK
Definition: d3d.h:106
DWORD ddraw_allocate_handle(struct ddraw_handle_table *t, void *object, enum ddraw_handle_type type) DECLSPEC_HIDDEN
Definition: main.c:113
struct d3d_device * unsafe_impl_from_IDirect3DDevice2(IDirect3DDevice2 *iface) DECLSPEC_HIDDEN
Definition: device.c:6864
#define DDRAW_INVALID_HANDLE
@ DDRAW_HANDLE_SURFACE
unsigned long DWORD
Definition: ntddk_ex.h:95
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
struct ddraw_handle_table handle_table
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368

Referenced by d3d_texture1_GetHandle().

◆ d3d_texture2_Load()

static HRESULT WINAPI d3d_texture2_Load ( IDirect3DTexture2 *  iface,
IDirect3DTexture2 *  src_texture 
)
static

Definition at line 5249 of file surface.c.

5250{
5251 struct ddraw_surface *dst_surface = impl_from_IDirect3DTexture2(iface);
5252 struct ddraw_surface *src_surface = unsafe_impl_from_IDirect3DTexture2(src_texture);
5253 RECT src_rect, dst_rect;
5254 HRESULT hr;
5255
5256 TRACE("iface %p, src_texture %p.\n", iface, src_texture);
5257
5258 if (src_surface == dst_surface)
5259 {
5260 TRACE("copying surface %p to surface %p, why?\n", src_surface, dst_surface);
5261 return D3D_OK;
5262 }
5263
5265
5266 for (;;)
5267 {
5268 DDSURFACEDESC *src_desc = (DDSURFACEDESC *)&src_surface->surface_desc;
5269
5270 TRACE("Copying surface %p to surface %p.\n", src_surface, dst_surface);
5271
5272 if (compare_format(&src_surface->surface_desc.u4.ddpfPixelFormat,
5273 &dst_surface->surface_desc.u4.ddpfPixelFormat))
5274 {
5275 struct ddraw_palette *dst_pal, *src_pal;
5276
5277 /* Get the palettes */
5278 dst_pal = dst_surface->palette;
5279 src_pal = src_surface->palette;
5280
5281 if (src_pal)
5282 {
5283 PALETTEENTRY palent[256];
5284
5285 if (!dst_pal)
5286 {
5289 }
5290 IDirectDrawPalette_GetEntries(&src_pal->IDirectDrawPalette_iface, 0, 0, 256, palent);
5291 IDirectDrawPalette_SetEntries(&dst_pal->IDirectDrawPalette_iface, 0, 0, 256, palent);
5292 }
5293
5294 if (src_desc->dwFlags & DDSD_CKSRCBLT)
5295 {
5296 IDirectDrawSurface7_SetColorKey(&dst_surface->IDirectDrawSurface7_iface,
5297 DDCKEY_SRCBLT, &src_desc->ddckCKSrcBlt);
5298 }
5299 }
5300 else
5301 {
5302 if (src_desc->dwFlags & DDSD_CKSRCBLT)
5303 return E_FAIL;
5304 }
5305
5306 /* Suppress the ALLOCONLOAD flag */
5307 dst_surface->surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
5308
5309 SetRect(&src_rect, 0, 0, src_surface->surface_desc.dwWidth, src_surface->surface_desc.dwHeight);
5310 SetRect(&dst_rect, 0, 0, dst_surface->surface_desc.dwWidth, dst_surface->surface_desc.dwHeight);
5311
5312 hr = wined3d_texture_blt(dst_surface->wined3d_texture, dst_surface->sub_resource_idx, &dst_rect,
5313 src_surface->wined3d_texture, src_surface->sub_resource_idx, &src_rect,
5315 if (FAILED(hr))
5316 {
5317 ERR("Failed to blit surface, hr %#x.\n", hr);
5319 return hr;
5320 }
5321
5322 if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
5323 src_surface = get_sub_mimaplevel(src_surface);
5324 else
5325 src_surface = NULL;
5326
5327 if (dst_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
5328 dst_surface = get_sub_mimaplevel(dst_surface);
5329 else
5330 dst_surface = NULL;
5331
5332 if (src_surface && !dst_surface)
5333 return DDERR_NOTFOUND;
5334
5335 if (!src_surface || !dst_surface)
5336 break;
5337 }
5338
5340
5341 return hr;
5342}
#define E_FAIL
Definition: ddrawi.h:102
static BOOL compare_format(DDPIXELFORMAT *format1, DDPIXELFORMAT *format2)
Definition: surface.c:5192
static struct ddraw_surface * get_sub_mimaplevel(struct ddraw_surface *surface)
Definition: surface.c:5177
struct ddraw_surface * unsafe_impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
Definition: surface.c:5721
HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const RECT *dst_rect, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
Definition: texture.c:3262
#define FAILED(hr)
Definition: intsafe.h:51
#define DDSCAPS_MIPMAP
Definition: ddraw.h:272
#define DDERR_NOTFOUND
Definition: ddraw.h:97
#define DDERR_NOPALETTEATTACHED
Definition: ddraw.h:146
#define DDSD_CKSRCBLT
Definition: ddraw.h:220
#define DDCKEY_SRCBLT
Definition: ddraw.h:478
HRESULT hr
Definition: shlfolder.c:183
DWORD dwCaps
Definition: ddraw.h:732
DWORD dwWidth
Definition: ddraw.h:1155
DWORD dwHeight
Definition: ddraw.h:1154
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DDPIXELFORMAT ddpfPixelFormat
Definition: ddraw.h:1185
IDirectDrawPalette IDirectDrawPalette_iface
DDSURFACEDESC2 surface_desc
unsigned int sub_resource_idx
struct ddraw_palette * palette
struct wined3d_texture * wined3d_texture
@ WINED3D_TEXF_LINEAR
Definition: wined3d.h:687
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)

Referenced by d3d_texture1_Load().

◆ d3d_texture2_PaletteChanged()

static HRESULT WINAPI d3d_texture2_PaletteChanged ( IDirect3DTexture2 *  iface,
DWORD  start,
DWORD  count 
)
static

Definition at line 5080 of file surface.c.

5081{
5082 FIXME("iface %p, start %u, count %u stub!\n", iface, start, count);
5083
5084 return D3D_OK;
5085}
#define FIXME(fmt,...)
Definition: debug.h:114

Referenced by d3d_texture1_PaletteChanged().

◆ d3d_texture2_QueryInterface()

static HRESULT WINAPI d3d_texture2_QueryInterface ( IDirect3DTexture2 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 297 of file surface.c.

298{
299 struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
300
301 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
302
304}

◆ d3d_texture2_Release()

static ULONG WINAPI d3d_texture2_Release ( IDirect3DTexture2 *  iface)
static

Definition at line 691 of file surface.c.

692{
693 struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
694
695 TRACE("iface %p.\n", iface);
696
697 return IUnknown_Release(surface->texture_outer);
698}

◆ ddraw_gamma_control_AddRef()

static ULONG WINAPI ddraw_gamma_control_AddRef ( IDirectDrawGammaControl *  iface)
static

Definition at line 416 of file surface.c.

417{
419 ULONG refcount = InterlockedIncrement(&This->gamma_count);
420
421 TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
422
423 if (refcount == 1)
424 {
426 }
427
428 return refcount;
429}
#define InterlockedIncrement
Definition: armddk.h:53
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34
static void ddraw_surface_add_iface(struct ddraw_surface *surface)
Definition: surface.c:315
uint32_t ULONG
Definition: typedefs.h:59

◆ ddraw_gamma_control_GetGammaRamp()

static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp ( IDirectDrawGammaControl *  iface,
DWORD  flags,
DDGAMMARAMP gamma_ramp 
)
static

Definition at line 4996 of file surface.c.

4998{
4999 struct ddraw_surface *surface = impl_from_IDirectDrawGammaControl(iface);
5000
5001 TRACE("iface %p, flags %#x, gamma_ramp %p.\n", iface, flags, gamma_ramp);
5002
5003 if (!gamma_ramp)
5004 {
5005 WARN("Invalid gamma_ramp passed.\n");
5006 return DDERR_INVALIDPARAMS;
5007 }
5008
5011 {
5012 /* Note: DDGAMMARAMP is compatible with struct wined3d_gamma_ramp. */
5013 wined3d_device_get_gamma_ramp(surface->ddraw->wined3d_device, 0, (struct wined3d_gamma_ramp *)gamma_ramp);
5014 }
5015 else
5016 {
5017 ERR("Not implemented for non-primary surfaces.\n");
5018 }
5020
5021 return DD_OK;
5022}
void CDECL wined3d_device_get_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_gamma_ramp *ramp)
Definition: device.c:5069
GLbitfield flags
Definition: glext.h:7161
#define DDSCAPS_PRIMARYSURFACE
Definition: ddraw.h:258
#define DD_OK
Definition: ddraw.h:186
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
struct ddraw * ddraw

◆ ddraw_gamma_control_QueryInterface()

static HRESULT WINAPI ddraw_gamma_control_QueryInterface ( IDirectDrawGammaControl *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 287 of file surface.c.

289{
290 struct ddraw_surface *surface = impl_from_IDirectDrawGammaControl(iface);
291
292 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
293
295}

◆ ddraw_gamma_control_Release()

static ULONG WINAPI ddraw_gamma_control_Release ( IDirectDrawGammaControl *  iface)
static

Definition at line 676 of file surface.c.

677{
679 ULONG refcount = InterlockedDecrement(&This->gamma_count);
680
681 TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
682
683 if (refcount == 0)
684 {
686 }
687
688 return refcount;
689}
#define InterlockedDecrement
Definition: armddk.h:52
static ULONG ddraw_surface_release_iface(struct ddraw_surface *This)
Definition: surface.c:533

◆ ddraw_gamma_control_SetGammaRamp()

static HRESULT WINAPI ddraw_gamma_control_SetGammaRamp ( IDirectDrawGammaControl *  iface,
DWORD  flags,
DDGAMMARAMP gamma_ramp 
)
static

Definition at line 5038 of file surface.c.

5040{
5041 struct ddraw_surface *surface = impl_from_IDirectDrawGammaControl(iface);
5042
5043 TRACE("iface %p, flags %#x, gamma_ramp %p.\n", iface, flags, gamma_ramp);
5044
5045 if (!gamma_ramp)
5046 {
5047 WARN("Invalid gamma_ramp passed.\n");
5048 return DDERR_INVALIDPARAMS;
5049 }
5050
5053 {
5054 /* Note: DDGAMMARAMP is compatible with struct wined3d_gamma_ramp. */
5055 wined3d_device_set_gamma_ramp(surface->ddraw->wined3d_device,
5056 0, flags, (struct wined3d_gamma_ramp *)gamma_ramp);
5057 }
5058 else
5059 {
5060 ERR("Not implemented for non-primary surfaces.\n");
5061 }
5063
5064 return DD_OK;
5065}
void CDECL wined3d_device_set_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, DWORD flags, const struct wined3d_gamma_ramp *ramp)
Definition: device.c:5057

◆ ddraw_reset_enum_callback()

static HRESULT CDECL ddraw_reset_enum_callback ( struct wined3d_resource resource)
static

Definition at line 5786 of file surface.c.

5787{
5788 return DD_OK;
5789}

Referenced by ddraw_surface_create().

◆ ddraw_surface1_AddAttachedSurface()

static HRESULT WINAPI ddraw_surface1_AddAttachedSurface ( IDirectDrawSurface *  iface,
IDirectDrawSurface *  attachment 
)
static

Definition at line 1989 of file surface.c.

1990{
1991 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1993 HRESULT hr;
1994
1995 TRACE("iface %p, attachment %p.\n", iface, attachment);
1996
1998 attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL)))
1999 return hr;
2000
2001 attachment_impl->attached_iface = (IUnknown *)attachment;
2002 IUnknown_AddRef(attachment_impl->attached_iface);
2004 return hr;
2005}
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static ULONG WINAPI ddraw_surface4_Release(IDirectDrawSurface4 *iface)
Definition: surface.c:616
static HRESULT WINAPI ddraw_surface4_AddAttachedSurface(IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
Definition: surface.c:1914
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5705
GLenum attachment
Definition: glext.h:6295
IUnknown * attached_iface
IDirectDrawSurface4 IDirectDrawSurface4_iface

◆ ddraw_surface1_AddOverlayDirtyRect()

static HRESULT WINAPI ddraw_surface1_AddOverlayDirtyRect ( IDirectDrawSurface *  iface,
RECT rect 
)
static

Definition at line 2186 of file surface.c.

2187{
2188 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2189
2190 TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
2191
2193}
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
static HRESULT WINAPI ddraw_surface7_AddOverlayDirtyRect(IDirectDrawSurface7 *iface, RECT *Rect)
Definition: surface.c:2152
& rect
Definition: startmenu.cpp:1413

◆ ddraw_surface1_AddRef()

static ULONG WINAPI ddraw_surface1_AddRef ( IDirectDrawSurface *  iface)
static

Definition at line 401 of file surface.c.

402{
404 ULONG refcount = InterlockedIncrement(&This->ref1);
405
406 TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
407
408 if (refcount == 1)
409 {
411 }
412
413 return refcount;
414}

Referenced by ddraw_surface1_GetAttachedSurface(), and EnumCallback().

◆ ddraw_surface1_Blt()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Blt ( IDirectDrawSurface *  iface,
RECT dst_rect,
IDirectDrawSurface *  src_surface,
RECT src_rect,
DWORD  flags,
DDBLTFX fx 
)
static

Definition at line 1794 of file surface.c.

1796{
1798 struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface(src_surface);
1799
1800 TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
1801 iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
1802
1803 return ddraw_surface7_Blt(&dst->IDirectDrawSurface7_iface, dst_rect,
1804 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags, fx);
1805}
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
Definition: surface.c:1574
GLenum GLenum dst
Definition: glext.h:6340
GLfixed fx
Definition: tritemp.h:484

◆ ddraw_surface1_BltBatch()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltBatch ( IDirectDrawSurface *  iface,
DDBLTBATCH batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 2807 of file surface.c.

2808{
2809 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2810
2811 TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags);
2812
2814}
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltBatch(IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
Definition: surface.c:2772

◆ ddraw_surface1_BltFast()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltFast ( IDirectDrawSurface *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface *  src_surface,
RECT src_rect,
DWORD  flags 
)
static

Definition at line 4348 of file surface.c.

4350{
4351 struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface(iface);
4352 struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface(src_surface);
4353
4354 TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
4355 iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
4356
4357 return ddraw_surface7_BltFast(&dst_impl->IDirectDrawSurface7_iface, dst_x, dst_y,
4358 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags);
4359}
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast(IDirectDrawSurface7 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD trans)
Definition: surface.c:4244

◆ ddraw_surface1_DeleteAttachedSurface()

static HRESULT WINAPI ddraw_surface1_DeleteAttachedSurface ( IDirectDrawSurface *  iface,
DWORD  flags,
IDirectDrawSurface *  attachment 
)
static

Definition at line 2129 of file surface.c.

2131{
2132 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2134
2135 TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment);
2136
2137 return ddraw_surface_delete_attached_surface(surface, attachment_impl, (IUnknown *)attachment);
2138}
static HRESULT ddraw_surface_delete_attached_surface(struct ddraw_surface *surface, struct ddraw_surface *attachment, IUnknown *detach_iface)
Definition: surface.c:2022

◆ ddraw_surface1_EnumAttachedSurfaces()

static HRESULT WINAPI ddraw_surface1_EnumAttachedSurfaces ( IDirectDrawSurface *  iface,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 2961 of file surface.c.

2963{
2964 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2965 struct callback_info info;
2966
2967 TRACE("iface %p, context %p, callback %p.\n", iface, context, callback);
2968
2969 info.callback = callback;
2970 info.context = context;
2971
2973 &info, EnumCallback);
2974}
static HRESULT CALLBACK EnumCallback(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: surface.c:2903
static HRESULT WINAPI ddraw_surface7_EnumAttachedSurfaces(IDirectDrawSurface7 *iface, void *context, LPDDENUMSURFACESCALLBACK7 cb)
Definition: surface.c:2830
static IPrintDialogCallback callback
Definition: printdlg.c:326
void * context
Definition: main.c:47
Definition: http.c:7252

◆ ddraw_surface1_EnumOverlayZOrders()

static HRESULT WINAPI ddraw_surface1_EnumOverlayZOrders ( IDirectDrawSurface *  iface,
DWORD  flags,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 3043 of file surface.c.

3045{
3046 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3047 struct callback_info info;
3048
3049 TRACE("iface %p, flags %#x, context %p, callback %p.\n", iface, flags, context, callback);
3050
3051 info.callback = callback;
3052 info.context = context;
3053
3056}
static HRESULT WINAPI ddraw_surface7_EnumOverlayZOrders(IDirectDrawSurface7 *iface, DWORD Flags, void *context, LPDDENUMSURFACESCALLBACK7 cb)
Definition: surface.c:2990

◆ ddraw_surface1_Flip()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Flip ( IDirectDrawSurface *  iface,
IDirectDrawSurface *  src,
DWORD  flags 
)
static

Definition at line 1395 of file surface.c.

1397{
1398 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1400
1401 TRACE("iface %p, src %p, flags %#x.\n", iface, src, flags);
1402
1404 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, flags);
1405}
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDrawSurface7 *src, DWORD flags)
Definition: surface.c:1227
GLenum src
Definition: glext.h:6340

◆ ddraw_surface1_GetAttachedSurface()

static HRESULT WINAPI ddraw_surface1_GetAttachedSurface ( IDirectDrawSurface *  iface,
DDSCAPS caps,
IDirectDrawSurface **  attachment 
)
static

Definition at line 909 of file surface.c.

911{
912 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
913 struct ddraw_surface *attachment_impl;
914 IDirectDrawSurface7 *attachment7;
915 DDSCAPS2 caps2;
916 HRESULT hr;
917
918 TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, attachment);
919
920 caps2.dwCaps = caps->dwCaps;
921 caps2.dwCaps2 = 0;
922 caps2.dwCaps3 = 0;
923 caps2.u1.dwCaps4 = 0;
924
926 &caps2, &attachment7);
927 if (FAILED(hr))
928 {
929 *attachment = NULL;
930 return hr;
931 }
932 attachment_impl = impl_from_IDirectDrawSurface7(attachment7);
933 *attachment = &attachment_impl->IDirectDrawSurface_iface;
935 ddraw_surface7_Release(attachment7);
936
937 return hr;
938}
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *iface, DDSCAPS2 *Caps, IDirectDrawSurface7 **Surface)
Definition: surface.c:736
static ULONG WINAPI ddraw_surface7_Release(IDirectDrawSurface7 *iface)
Definition: surface.c:601
static ULONG WINAPI ddraw_surface1_AddRef(IDirectDrawSurface *iface)
Definition: surface.c:401
DWORD IDirectDrawSurface7
Definition: vmrender.idl:20
DWORD dwCaps4
Definition: ddraw.h:737
DWORD dwCaps3
Definition: ddraw.h:734
DWORD dwCaps2
Definition: ddraw.h:733
DWORD dwCaps
Definition: ddraw.h:727
IDirectDrawSurface IDirectDrawSurface_iface

◆ ddraw_surface1_GetBltStatus()

static HRESULT WINAPI ddraw_surface1_GetBltStatus ( IDirectDrawSurface *  iface,
DWORD  flags 
)
static

Definition at line 3109 of file surface.c.

3110{
3111 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3112
3113 TRACE("iface %p, flags %#x.\n", iface, flags);
3114
3116}
static HRESULT WINAPI ddraw_surface7_GetBltStatus(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3067

◆ ddraw_surface1_GetCaps()

static HRESULT WINAPI ddraw_surface1_GetCaps ( IDirectDrawSurface *  iface,
DDSCAPS caps 
)
static

Definition at line 2436 of file surface.c.

2437{
2438 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2439 DDSCAPS2 caps2;
2440 HRESULT hr;
2441
2442 TRACE("iface %p, caps %p.\n", iface, caps);
2443
2445 if (FAILED(hr)) return hr;
2446
2447 caps->dwCaps = caps2.dwCaps;
2448 return hr;
2449}
static HRESULT WINAPI ddraw_surface7_GetCaps(IDirectDrawSurface7 *iface, DDSCAPS2 *Caps)
Definition: surface.c:2383

◆ ddraw_surface1_GetClipper()

static HRESULT WINAPI ddraw_surface1_GetClipper ( IDirectDrawSurface *  iface,
IDirectDrawClipper **  clipper 
)
static

Definition at line 4426 of file surface.c.

4427{
4428 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4429
4430 TRACE("iface %p, clipper %p.\n", iface, clipper);
4431
4433}
static HRESULT WINAPI ddraw_surface7_GetClipper(IDirectDrawSurface7 *iface, IDirectDrawClipper **Clipper)
Definition: surface.c:4376
struct ddraw_clipper * clipper

◆ ddraw_surface1_GetColorKey()

static HRESULT WINAPI ddraw_surface1_GetColorKey ( IDirectDrawSurface *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 3218 of file surface.c.

3219{
3220 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3221
3222 TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
3223
3225}
static HRESULT WINAPI ddraw_surface7_GetColorKey(IDirectDrawSurface7 *iface, DWORD Flags, DDCOLORKEY *CKey)
Definition: surface.c:3132

◆ ddraw_surface1_GetDC()

static HRESULT WINAPI ddraw_surface1_GetDC ( IDirectDrawSurface *  iface,
HDC dc 
)
static

Definition at line 2287 of file surface.c.

2288{
2289 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2290
2291 TRACE("iface %p, dc %p.\n", iface, dc);
2292
2294}
static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *dc)
Definition: surface.c:2208
static const WCHAR dc[]

◆ ddraw_surface1_GetFlipStatus()

static HRESULT WINAPI ddraw_surface1_GetFlipStatus ( IDirectDrawSurface *  iface,
DWORD  flags 
)
static

Definition at line 3280 of file surface.c.

3281{
3282 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3283
3284 TRACE("iface %p, flags %#x.\n", iface, flags);
3285
3287}
static HRESULT WINAPI ddraw_surface7_GetFlipStatus(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3236

◆ ddraw_surface1_GetOverlayPosition()

static HRESULT WINAPI ddraw_surface1_GetOverlayPosition ( IDirectDrawSurface *  iface,
LONG x,
LONG y 
)
static

Definition at line 3343 of file surface.c.

3344{
3345 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3346
3347 TRACE("iface %p, x %p, y %p.\n", iface, x, y);
3348
3350}
static HRESULT WINAPI ddraw_surface7_GetOverlayPosition(IDirectDrawSurface7 *iface, LONG *x, LONG *y)
Definition: surface.c:3301
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ ddraw_surface1_GetPalette()

static HRESULT WINAPI ddraw_surface1_GetPalette ( IDirectDrawSurface *  iface,
IDirectDrawPalette **  palette 
)
static

Definition at line 4766 of file surface.c.

4767{
4768 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4769
4770 TRACE("iface %p, palette %p.\n", iface, palette);
4771
4773}
static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDirectDrawPalette **palette)
Definition: surface.c:4707
static HPALETTE palette
Definition: clipboard.c:1345

◆ ddraw_surface1_GetPixelFormat()

static HRESULT WINAPI ddraw_surface1_GetPixelFormat ( IDirectDrawSurface *  iface,
DDPIXELFORMAT pixel_format 
)
static

Definition at line 3410 of file surface.c.

3411{
3412 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3413
3414 TRACE("iface %p, pixel_format %p.\n", iface, pixel_format);
3415
3417}
static HRESULT WINAPI ddraw_surface7_GetPixelFormat(IDirectDrawSurface7 *iface, DDPIXELFORMAT *PixelFormat)
Definition: surface.c:3366

◆ ddraw_surface1_GetSurfaceDesc()

static HRESULT WINAPI ddraw_surface1_GetSurfaceDesc ( IDirectDrawSurface *  iface,
DDSURFACEDESC DDSD 
)
static

Definition at line 3502 of file surface.c.

3503{
3504 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3505
3506 TRACE("iface %p, surface_desc %p.\n", iface, DDSD);
3507
3509}
static HRESULT WINAPI ddraw_surface3_GetSurfaceDesc(IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc)
Definition: surface.c:3466
IDirectDrawSurface3 IDirectDrawSurface3_iface

◆ ddraw_surface1_Initialize()

static HRESULT WINAPI ddraw_surface1_Initialize ( IDirectDrawSurface *  iface,
IDirectDraw *  ddraw,
DDSURFACEDESC surface_desc 
)
static

Definition at line 3569 of file surface.c.

3571{
3572 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3573 DDSURFACEDESC2 surface_desc2;
3574
3575 TRACE("iface %p, ddraw %p, surface_desc %p.\n", iface, ddraw, surface_desc);
3576
3577 if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
3579 ddraw, surface_desc ? &surface_desc2 : NULL);
3580}
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
static HRESULT WINAPI ddraw_surface7_Initialize(IDirectDrawSurface7 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
Definition: surface.c:3524

◆ ddraw_surface1_IsLost()

static HRESULT WINAPI ddraw_surface1_IsLost ( IDirectDrawSurface *  iface)
static

Definition at line 3651 of file surface.c.

3652{
3653 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3654
3655 TRACE("iface %p.\n", iface);
3656
3658}
static HRESULT WINAPI ddraw_surface7_IsLost(IDirectDrawSurface7 *iface)
Definition: surface.c:3612

◆ ddraw_surface1_Lock()

static HRESULT WINAPI ddraw_surface1_Lock ( IDirectDrawSurface *  iface,
RECT rect,
DDSURFACEDESC surface_desc,
DWORD  flags,
HANDLE  h 
)
static

Definition at line 1138 of file surface.c.

1140{
1141 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1142 unsigned int surface_desc_size;
1143 DDSURFACEDESC2 surface_desc2;
1144 HRESULT hr;
1145
1146 TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
1148
1149 if (!surface_validate_lock_desc(surface, surface_desc, &surface_desc_size))
1150 return DDERR_INVALIDPARAMS;
1151
1152 surface_desc2.dwSize = surface_desc->dwSize;
1153 surface_desc2.dwFlags = 0;
1154 hr = surface_lock(surface, rect, &surface_desc2, surface_desc_size, flags, h);
1155 DDSD2_to_DDSD(&surface_desc2, surface_desc);
1156 surface_desc->dwSize = surface_desc2.dwSize;
1157 return hr;
1158}
void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out) DECLSPEC_HIDDEN
Definition: utils.c:1262
static HRESULT surface_lock(struct ddraw_surface *surface, RECT *rect, DDSURFACEDESC2 *surface_desc, unsigned int surface_desc_size, DWORD flags, HANDLE h)
Definition: surface.c:956
static BOOL surface_validate_lock_desc(struct ddraw_surface *surface, const DDSURFACEDESC *desc, unsigned int *size)
Definition: surface.c:1037
DWORD dwFlags
Definition: ddraw.h:1153
DWORD dwSize
Definition: ddraw.h:1152

◆ ddraw_surface1_QueryInterface()

static HRESULT WINAPI ddraw_surface1_QueryInterface ( IDirectDrawSurface *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 278 of file surface.c.

279{
280 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
281
282 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
283
285}

◆ ddraw_surface1_Release()

static ULONG WINAPI ddraw_surface1_Release ( IDirectDrawSurface *  iface)
static

Definition at line 661 of file surface.c.

662{
664 ULONG refcount = InterlockedDecrement(&This->ref1);
665
666 TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
667
668 if (refcount == 0)
669 {
671 }
672
673 return refcount;
674}

◆ ddraw_surface1_ReleaseDC()

static HRESULT WINAPI ddraw_surface1_ReleaseDC ( IDirectDrawSurface *  iface,
HDC  dc 
)
static

Definition at line 2361 of file surface.c.

2362{
2363 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2364
2365 TRACE("iface %p, dc %p.\n", iface, dc);
2366
2368}
static HRESULT WINAPI ddraw_surface7_ReleaseDC(IDirectDrawSurface7 *iface, HDC hdc)
Definition: surface.c:2308

◆ ddraw_surface1_Restore()

static HRESULT WINAPI ddraw_surface1_Restore ( IDirectDrawSurface *  iface)
static

Definition at line 3743 of file surface.c.

3744{
3745 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3746
3747 TRACE("iface %p.\n", iface);
3748
3750}
static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface)
Definition: surface.c:3670

◆ ddraw_surface1_SetClipper()

static HRESULT WINAPI ddraw_surface1_SetClipper ( IDirectDrawSurface *  iface,
IDirectDrawClipper *  clipper 
)
static

Definition at line 4522 of file surface.c.

4523{
4524 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4525
4526 TRACE("iface %p, clipper %p.\n", iface, clipper);
4527
4529}
static HRESULT WINAPI ddraw_surface7_SetClipper(IDirectDrawSurface7 *iface, IDirectDrawClipper *iclipper)
Definition: surface.c:4447

◆ ddraw_surface1_SetColorKey()

static HRESULT WINAPI ddraw_surface1_SetColorKey ( IDirectDrawSurface *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 4896 of file surface.c.

4897{
4898 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4899
4900 TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
4901
4903}
static HRESULT ddraw_surface_set_color_key(struct ddraw_surface *surface, DWORD flags, DDCOLORKEY *color_key)
Definition: surface.c:4775

◆ ddraw_surface1_SetOverlayPosition()

static HRESULT WINAPI ddraw_surface1_SetOverlayPosition ( IDirectDrawSurface *  iface,
LONG  x,
LONG  y 
)
static

Definition at line 3806 of file surface.c.

3807{
3808 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3809
3810 TRACE("iface %p, x %d, y %d.\n", iface, x, y);
3811
3813}
static HRESULT WINAPI ddraw_surface7_SetOverlayPosition(IDirectDrawSurface7 *iface, LONG x, LONG y)
Definition: surface.c:3764

◆ ddraw_surface1_SetPalette()

static HRESULT WINAPI ddraw_surface1_SetPalette ( IDirectDrawSurface *  iface,
IDirectDrawPalette *  palette 
)
static

Definition at line 4967 of file surface.c.

4968{
4969 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4970
4971 TRACE("iface %p, palette %p.\n", iface, palette);
4972
4973 if (IDirectDrawSurface_IsLost(iface) == DDERR_SURFACELOST)
4974 {
4975 WARN("Surface lost, returning DDERR_SURFACELOST.\n");
4976 return DDERR_SURFACELOST;
4977 }
4978
4979 return ddraw_surface_set_palette(surface, palette);
4980}
static HRESULT ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectDrawPalette *palette)
Definition: surface.c:449
#define DDERR_SURFACELOST
Definition: ddraw.h:122

◆ ddraw_surface1_Unlock()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Unlock ( IDirectDrawSurface *  iface,
void data 
)
static

Definition at line 1217 of file surface.c.

1218{
1219 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1220
1221 TRACE("iface %p, data %p.\n", iface, data);
1222
1223 /* data might not be the LPRECT of later versions, so drop it. */
1225}
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Unlock(IDirectDrawSurface7 *iface, RECT *pRect)
Definition: surface.c:1172
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950

◆ ddraw_surface1_UpdateOverlay()

static HRESULT WINAPI ddraw_surface1_UpdateOverlay ( IDirectDrawSurface *  iface,
RECT src_rect,
IDirectDrawSurface *  dst_surface,
RECT dst_rect,
DWORD  flags,
DDOVERLAYFX fx 
)
static

Definition at line 3904 of file surface.c.

3906{
3907 struct ddraw_surface *src_impl = impl_from_IDirectDrawSurface(iface);
3908 struct ddraw_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface(dst_surface);
3909
3910 TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#x, fx %p.\n",
3911 iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
3912
3913 return ddraw_surface7_UpdateOverlay(&src_impl->IDirectDrawSurface7_iface, src_rect,
3914 dst_impl ? &dst_impl->IDirectDrawSurface7_iface : NULL, dst_rect, flags, fx);
3915}
static HRESULT WINAPI ddraw_surface7_UpdateOverlay(IDirectDrawSurface7 *iface, RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
Definition: surface.c:3830

◆ ddraw_surface1_UpdateOverlayDisplay()

static HRESULT WINAPI ddraw_surface1_UpdateOverlayDisplay ( IDirectDrawSurface *  iface,
DWORD  flags 
)
static

Definition at line 3962 of file surface.c.

3963{
3964 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3965
3966 TRACE("iface %p, flags %#x.\n", iface, flags);
3967
3969}
static HRESULT WINAPI ddraw_surface7_UpdateOverlayDisplay(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3928

◆ ddraw_surface1_UpdateOverlayZOrder()

static HRESULT WINAPI ddraw_surface1_UpdateOverlayZOrder ( IDirectDrawSurface *  iface,
DWORD  flags,
IDirectDrawSurface *  reference 
)
static

Definition at line 4039 of file surface.c.

4041{
4042 struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4044
4045 TRACE("iface %p, flags %#x, reference %p.\n", iface, flags, reference);
4046
4048 reference_impl ? &reference_impl->IDirectDrawSurface7_iface : NULL);
4049}
static HRESULT WINAPI ddraw_surface7_UpdateOverlayZOrder(IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *reference)
Definition: surface.c:3984
GLint reference
Definition: glext.h:11729

◆ ddraw_surface2_AddAttachedSurface()

static HRESULT WINAPI ddraw_surface2_AddAttachedSurface ( IDirectDrawSurface2 *  iface,
IDirectDrawSurface2 *  attachment 
)
static

Definition at line 1971 of file surface.c.

1972{
1973 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1975 HRESULT hr;
1976
1977 TRACE("iface %p, attachment %p.\n", iface, attachment);
1978
1980 attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL)))
1981 return hr;
1982
1983 attachment_impl->attached_iface = (IUnknown *)attachment;
1984 IUnknown_AddRef(attachment_impl->attached_iface);
1986 return hr;
1987}
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5689

◆ ddraw_surface2_AddOverlayDirtyRect()

static HRESULT WINAPI ddraw_surface2_AddOverlayDirtyRect ( IDirectDrawSurface2 *  iface,
RECT rect 
)
static

Definition at line 2177 of file surface.c.

2178{
2179 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2180
2181 TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
2182
2184}

◆ ddraw_surface2_AddRef()

static ULONG WINAPI ddraw_surface2_AddRef ( IDirectDrawSurface2 *  iface)
static

Definition at line 386 of file surface.c.

387{
389 ULONG refcount = InterlockedIncrement(&This->ref2);
390
391 TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
392
393 if (refcount == 1)
394 {
396 }
397
398 return refcount;
399}

Referenced by ddraw_surface2_GetAttachedSurface().

◆ ddraw_surface2_Blt()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Blt ( IDirectDrawSurface2 *  iface,
RECT dst_rect,
IDirectDrawSurface2 *  src_surface,
RECT src_rect,
DWORD  flags,
DDBLTFX fx 
)
static

Definition at line 1781 of file surface.c.

1783{
1785 struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface2(src_surface);
1786
1787 TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
1788 iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
1789
1790 return ddraw_surface7_Blt(&dst->IDirectDrawSurface7_iface, dst_rect,
1791 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags, fx);
1792}

◆ ddraw_surface2_BltBatch()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltBatch ( IDirectDrawSurface2 *  iface,
DDBLTBATCH batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 2798 of file surface.c.

2799{
2800 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2801
2802 TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags);
2803
2805}

◆ ddraw_surface2_BltFast()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltFast ( IDirectDrawSurface2 *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface2 *  src_surface,
RECT src_rect,
DWORD  flags 
)
static

Definition at line 4335 of file surface.c.

4337{
4338 struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface2(iface);
4339 struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface2(src_surface);
4340
4341 TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
4342 iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
4343
4344 return ddraw_surface7_BltFast(&dst_impl->IDirectDrawSurface7_iface, dst_x, dst_y,
4345 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags);
4346}

◆ ddraw_surface2_DeleteAttachedSurface()

static HRESULT WINAPI ddraw_surface2_DeleteAttachedSurface ( IDirectDrawSurface2 *  iface,
DWORD  flags,
IDirectDrawSurface2 *  attachment 
)
static

Definition at line 2118 of file surface.c.

2120{
2121 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2123
2124 TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment);
2125
2126 return ddraw_surface_delete_attached_surface(surface, attachment_impl, (IUnknown *)attachment);
2127}

◆ ddraw_surface2_EnumAttachedSurfaces()

static HRESULT WINAPI ddraw_surface2_EnumAttachedSurfaces ( IDirectDrawSurface2 *  iface,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 2946 of file surface.c.

2948{
2949 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2950 struct callback_info info;
2951
2952 TRACE("iface %p, context %p, callback %p.\n", iface, context, callback);
2953
2954 info.callback = callback;
2955 info.context = context;
2956
2958 &info, EnumCallback);
2959}

◆ ddraw_surface2_EnumOverlayZOrders()

static HRESULT WINAPI ddraw_surface2_EnumOverlayZOrders ( IDirectDrawSurface2 *  iface,
DWORD  flags,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 3028 of file surface.c.

3030{
3031 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3032 struct callback_info info;
3033
3034 TRACE("iface %p, flags %#x, context %p, callback %p.\n", iface, flags, context, callback);
3035
3036 info.callback = callback;
3037 info.context = context;
3038
3041}

◆ ddraw_surface2_Flip()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Flip ( IDirectDrawSurface2 *  iface,
IDirectDrawSurface2 *  src,
DWORD  flags 
)
static

Definition at line 1383 of file surface.c.

1385{
1386 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1388
1389 TRACE("iface %p, src %p, flags %#x.\n", iface, src, flags);
1390
1392 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, flags);
1393}

◆ ddraw_surface2_GetAttachedSurface()

static HRESULT WINAPI ddraw_surface2_GetAttachedSurface ( IDirectDrawSurface2 *  iface,
DDSCAPS caps,
IDirectDrawSurface2 **  attachment 
)
static

Definition at line 878 of file surface.c.

880{
881 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
882 struct ddraw_surface *attachment_impl;
883 IDirectDrawSurface7 *attachment7;
884 DDSCAPS2 caps2;
885 HRESULT hr;
886
887 TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, attachment);
888
889 caps2.dwCaps = caps->dwCaps;
890 caps2.dwCaps2 = 0;
891 caps2.dwCaps3 = 0;
892 caps2.u1.dwCaps4 = 0;
893
895 &caps2, &attachment7);
896 if (FAILED(hr))
897 {
898 *attachment = NULL;
899 return hr;
900 }
901 attachment_impl = impl_from_IDirectDrawSurface7(attachment7);
902 *attachment = &attachment_impl->IDirectDrawSurface2_iface;
904 ddraw_surface7_Release(attachment7);
905
906 return hr;
907}
static ULONG WINAPI ddraw_surface2_AddRef(IDirectDrawSurface2 *iface)
Definition: surface.c:386
IDirectDrawSurface2 IDirectDrawSurface2_iface

◆ ddraw_surface2_GetBltStatus()

static HRESULT WINAPI ddraw_surface2_GetBltStatus ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 3100 of file surface.c.

3101{
3102 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3103
3104 TRACE("iface %p, flags %#x.\n", iface, flags);
3105
3107}

◆ ddraw_surface2_GetCaps()

static HRESULT WINAPI ddraw_surface2_GetCaps ( IDirectDrawSurface2 *  iface,
DDSCAPS caps 
)
static

Definition at line 2421 of file surface.c.

2422{
2423 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2424 DDSCAPS2 caps2;
2425 HRESULT hr;
2426
2427 TRACE("iface %p, caps %p.\n", iface, caps);
2428
2430 if (FAILED(hr)) return hr;
2431
2432 caps->dwCaps = caps2.dwCaps;
2433 return hr;
2434}

◆ ddraw_surface2_GetClipper()

static HRESULT WINAPI ddraw_surface2_GetClipper ( IDirectDrawSurface2 *  iface,
IDirectDrawClipper **  clipper 
)
static

Definition at line 4417 of file surface.c.

4418{
4419 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4420
4421 TRACE("iface %p, clipper %p.\n", iface, clipper);
4422
4424}

◆ ddraw_surface2_GetColorKey()

static HRESULT WINAPI ddraw_surface2_GetColorKey ( IDirectDrawSurface2 *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 3209 of file surface.c.

3210{
3211 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3212
3213 TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
3214
3216}

◆ ddraw_surface2_GetDC()

static HRESULT WINAPI ddraw_surface2_GetDC ( IDirectDrawSurface2 *  iface,
HDC dc 
)
static

Definition at line 2278 of file surface.c.

2279{
2280 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2281
2282 TRACE("iface %p, dc %p.\n", iface, dc);
2283
2285}

◆ ddraw_surface2_GetDDInterface()

static HRESULT WINAPI ddraw_surface2_GetDDInterface ( IDirectDrawSurface2 *  iface,
void **  ddraw 
)
static

Definition at line 4116 of file surface.c.

4117{
4118 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4119
4120 TRACE("iface %p, ddraw %p.\n", iface, ddraw);
4121
4123}
static HRESULT WINAPI ddraw_surface7_GetDDInterface(IDirectDrawSurface7 *iface, void **DD)
Definition: surface.c:4065

◆ ddraw_surface2_GetFlipStatus()

static HRESULT WINAPI ddraw_surface2_GetFlipStatus ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 3271 of file surface.c.

3272{
3273 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3274
3275 TRACE("iface %p, flags %#x.\n", iface, flags);
3276
3278}

◆ ddraw_surface2_GetOverlayPosition()

static HRESULT WINAPI ddraw_surface2_GetOverlayPosition ( IDirectDrawSurface2 *  iface,
LONG x,
LONG y 
)
static

Definition at line 3334 of file surface.c.

3335{
3336 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3337
3338 TRACE("iface %p, x %p, y %p.\n", iface, x, y);
3339
3341}

◆ ddraw_surface2_GetPalette()

static HRESULT WINAPI ddraw_surface2_GetPalette ( IDirectDrawSurface2 *  iface,
IDirectDrawPalette **  palette 
)
static

Definition at line 4757 of file surface.c.

4758{
4759 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4760
4761 TRACE("iface %p, palette %p.\n", iface, palette);
4762
4764}

◆ ddraw_surface2_GetPixelFormat()

static HRESULT WINAPI ddraw_surface2_GetPixelFormat ( IDirectDrawSurface2 *  iface,
DDPIXELFORMAT pixel_format 
)
static

Definition at line 3401 of file surface.c.

3402{
3403 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3404
3405 TRACE("iface %p, pixel_format %p.\n", iface, pixel_format);
3406
3408}

◆ ddraw_surface2_GetSurfaceDesc()

static HRESULT WINAPI ddraw_surface2_GetSurfaceDesc ( IDirectDrawSurface2 *  iface,
DDSURFACEDESC DDSD 
)
static

Definition at line 3493 of file surface.c.

3494{
3495 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3496
3497 TRACE("iface %p, surface_desc %p.\n", iface, DDSD);
3498
3500}

◆ ddraw_surface2_Initialize()

static HRESULT WINAPI ddraw_surface2_Initialize ( IDirectDrawSurface2 *  iface,
IDirectDraw *  ddraw,
DDSURFACEDESC surface_desc 
)
static

Definition at line 3556 of file surface.c.

3558{
3559 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3560 DDSURFACEDESC2 surface_desc2;
3561
3562 TRACE("iface %p, ddraw %p, surface_desc %p.\n", iface, ddraw, surface_desc);
3563
3564 if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
3566 ddraw, surface_desc ? &surface_desc2 : NULL);
3567}

◆ ddraw_surface2_IsLost()

static HRESULT WINAPI ddraw_surface2_IsLost ( IDirectDrawSurface2 *  iface)
static

Definition at line 3642 of file surface.c.

3643{
3644 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3645
3646 TRACE("iface %p.\n", iface);
3647
3649}

◆ ddraw_surface2_Lock()

static HRESULT WINAPI ddraw_surface2_Lock ( IDirectDrawSurface2 *  iface,
RECT rect,
DDSURFACEDESC surface_desc,
DWORD  flags,
HANDLE  h 
)
static

Definition at line 1116 of file surface.c.

1118{
1119 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1120 unsigned int surface_desc_size;
1121 DDSURFACEDESC2 surface_desc2;
1122 HRESULT hr;
1123
1124 TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
1126
1127 if (!surface_validate_lock_desc(surface, surface_desc, &surface_desc_size))
1128 return DDERR_INVALIDPARAMS;
1129
1130 surface_desc2.dwSize = surface_desc->dwSize;
1131 surface_desc2.dwFlags = 0;
1132 hr = surface_lock(surface, rect, &surface_desc2, surface_desc_size, flags, h);
1133 DDSD2_to_DDSD(&surface_desc2, surface_desc);
1134 surface_desc->dwSize = surface_desc2.dwSize;
1135 return hr;
1136}

◆ ddraw_surface2_PageLock()

static HRESULT WINAPI ddraw_surface2_PageLock ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 2705 of file surface.c.

2706{
2707 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2708
2709 TRACE("iface %p, flags %#x.\n", iface, flags);
2710
2712}
static HRESULT WINAPI ddraw_surface7_PageLock(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:2679

◆ ddraw_surface2_PageUnlock()

static HRESULT WINAPI ddraw_surface2_PageUnlock ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 2751 of file surface.c.

2752{
2753 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2754
2755 TRACE("iface %p, flags %#x.\n", iface, flags);
2756
2758}
static HRESULT WINAPI ddraw_surface7_PageUnlock(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:2726

◆ ddraw_surface2_QueryInterface()

static HRESULT WINAPI ddraw_surface2_QueryInterface ( IDirectDrawSurface2 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 269 of file surface.c.

270{
271 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
272
273 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
274
276}

◆ ddraw_surface2_Release()

static ULONG WINAPI ddraw_surface2_Release ( IDirectDrawSurface2 *  iface)
static

Definition at line 646 of file surface.c.

647{
649 ULONG refcount = InterlockedDecrement(&This->ref2);
650
651 TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
652
653 if (refcount == 0)
654 {
656 }
657
658 return refcount;
659}

◆ ddraw_surface2_ReleaseDC()

static HRESULT WINAPI ddraw_surface2_ReleaseDC ( IDirectDrawSurface2 *  iface,
HDC  dc 
)
static

Definition at line 2352 of file surface.c.

2353{
2354 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2355
2356 TRACE("iface %p, dc %p.\n", iface, dc);
2357
2359}

◆ ddraw_surface2_Restore()

static HRESULT WINAPI ddraw_surface2_Restore ( IDirectDrawSurface2 *  iface)
static

Definition at line 3734 of file surface.c.

3735{
3736 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3737
3738 TRACE("iface %p.\n", iface);
3739
3741}

◆ ddraw_surface2_SetClipper()

static HRESULT WINAPI ddraw_surface2_SetClipper ( IDirectDrawSurface2 *  iface,
IDirectDrawClipper *  clipper 
)
static

Definition at line 4513 of file surface.c.

4514{
4515 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4516
4517 TRACE("iface %p, clipper %p.\n", iface, clipper);
4518
4520}

◆ ddraw_surface2_SetColorKey()

static HRESULT WINAPI ddraw_surface2_SetColorKey ( IDirectDrawSurface2 *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 4887 of file surface.c.

4888{
4889 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4890
4891 TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
4892
4894}

◆ ddraw_surface2_SetOverlayPosition()

static HRESULT WINAPI ddraw_surface2_SetOverlayPosition ( IDirectDrawSurface2 *  iface,
LONG  x,
LONG  y 
)
static

Definition at line 3797 of file surface.c.

3798{
3799 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3800
3801 TRACE("iface %p, x %d, y %d.\n", iface, x, y);
3802
3804}

◆ ddraw_surface2_SetPalette()

static HRESULT WINAPI ddraw_surface2_SetPalette ( IDirectDrawSurface2 *  iface,
IDirectDrawPalette *  palette 
)
static

Definition at line 4952 of file surface.c.

4953{
4954 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4955
4956 TRACE("iface %p, palette %p.\n", iface, palette);
4957
4958 if (IDirectDrawSurface2_IsLost(iface) == DDERR_SURFACELOST)
4959 {
4960 WARN("Surface lost, returning DDERR_SURFACELOST.\n");
4961 return DDERR_SURFACELOST;
4962 }
4963
4964 return ddraw_surface_set_palette(surface, palette);
4965}

◆ ddraw_surface2_Unlock()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Unlock ( IDirectDrawSurface2 *  iface,
void data 
)
static

Definition at line 1207 of file surface.c.

1208{
1209 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1210
1211 TRACE("iface %p, data %p.\n", iface, data);
1212
1213 /* data might not be the LPRECT of later versions, so drop it. */
1215}

◆ ddraw_surface2_UpdateOverlay()

static HRESULT WINAPI ddraw_surface2_UpdateOverlay ( IDirectDrawSurface2 *  iface,
RECT src_rect,
IDirectDrawSurface2 *  dst_surface,
RECT dst_rect,
DWORD  flags,
DDOVERLAYFX fx 
)
static

Definition at line 3891 of file surface.c.

3893{
3894 struct ddraw_surface *src_impl = impl_from_IDirectDrawSurface2(iface);
3895 struct ddraw_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface2(dst_surface);
3896
3897 TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#x, fx %p.\n",
3898 iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
3899
3900 return ddraw_surface7_UpdateOverlay(&src_impl->IDirectDrawSurface7_iface, src_rect,
3901 dst_impl ? &dst_impl->IDirectDrawSurface7_iface : NULL, dst_rect, flags, fx);
3902}

◆ ddraw_surface2_UpdateOverlayDisplay()

static HRESULT WINAPI ddraw_surface2_UpdateOverlayDisplay ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 3953 of file surface.c.

3954{
3955 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3956
3957 TRACE("iface %p, flags %#x.\n", iface, flags);
3958
3960}

◆ ddraw_surface2_UpdateOverlayZOrder()

static HRESULT WINAPI ddraw_surface2_UpdateOverlayZOrder ( IDirectDrawSurface2 *  iface,
DWORD  flags,
IDirectDrawSurface2 *  reference 
)
static

Definition at line 4027 of file surface.c.

4029{
4030 struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4032
4033 TRACE("iface %p, flags %#x, reference %p.\n", iface, flags, reference);
4034
4036 reference_impl ? &reference_impl->IDirectDrawSurface7_iface : NULL);
4037}

◆ ddraw_surface3_AddAttachedSurface()

static HRESULT WINAPI ddraw_surface3_AddAttachedSurface ( IDirectDrawSurface3 *  iface,
IDirectDrawSurface3 *  attachment 
)
static

Definition at line 1953 of file surface.c.

1954{
1955 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
1957 HRESULT hr;
1958
1959 TRACE("iface %p, attachment %p.\n", iface, attachment);
1960
1962 attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL)))
1963 return hr;
1964
1965 attachment_impl->attached_iface = (IUnknown *)attachment;
1966 IUnknown_AddRef(attachment_impl->attached_iface);
1968 return hr;
1969}
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
Definition: surface.c:5673

◆ ddraw_surface3_AddOverlayDirtyRect()

static HRESULT WINAPI ddraw_surface3_AddOverlayDirtyRect ( IDirectDrawSurface3 *  iface,
RECT rect 
)
static

Definition at line 2168 of file surface.c.

2169{
2170 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2171
2172 TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
2173
2175}

◆ ddraw_surface3_AddRef()

static ULONG WINAPI ddraw_surface3_AddRef ( IDirectDrawSurface3 *  iface)
static

Definition at line 371 of file surface.c.

372{
374 ULONG refcount = InterlockedIncrement(&This->ref3);
375
376 TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
377
378 if (refcount == 1)
379 {
381 }
382
383 return refcount;
384}

Referenced by ddraw_surface3_GetAttachedSurface().

◆ ddraw_surface3_Blt()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Blt ( IDirectDrawSurface3 *  iface,
RECT dst_rect,
IDirectDrawSurface3 *  src_surface,
RECT src_rect,
DWORD  flags,
DDBLTFX fx 
)
static

Definition at line 1768 of file surface.c.

1770{
1772 struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface3(src_surface);
1773
1774 TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
1775 iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
1776
1777 return ddraw_surface7_Blt(&dst->IDirectDrawSurface7_iface, dst_rect,
1778 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags, fx);
1779}

◆ ddraw_surface3_BltBatch()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_BltBatch ( IDirectDrawSurface3 *  iface,
DDBLTBATCH batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 2789 of file surface.c.

2790{
2791 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2792
2793 TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags);
2794
2796}

◆ ddraw_surface3_BltFast()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_BltFast ( IDirectDrawSurface3 *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface3 *  src_surface,
RECT src_rect,
DWORD  flags 
)
static

Definition at line 4322 of file surface.c.

4324{
4325 struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface3(iface);
4326 struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface3(src_surface);
4327
4328 TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
4329 iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
4330
4331 return ddraw_surface7_BltFast(&dst_impl->IDirectDrawSurface7_iface, dst_x, dst_y,
4332 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags);
4333}

◆ ddraw_surface3_DeleteAttachedSurface()

static HRESULT WINAPI ddraw_surface3_DeleteAttachedSurface ( IDirectDrawSurface3 *  iface,
DWORD  flags,
IDirectDrawSurface3 *  attachment 
)
static

Definition at line 2107 of file surface.c.

2109{
2110 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2112
2113 TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment);
2114
2115 return ddraw_surface_delete_attached_surface(surface, attachment_impl, (IUnknown *)attachment);
2116}

◆ ddraw_surface3_EnumAttachedSurfaces()

static HRESULT WINAPI ddraw_surface3_EnumAttachedSurfaces ( IDirectDrawSurface3 *  iface,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 2931 of file surface.c.

2933{
2934 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2935 struct callback_info info;
2936
2937 TRACE("iface %p, context %p, callback %p.\n", iface, context, callback);
2938
2939 info.callback = callback;
2940 info.context = context;
2941
2943 &info, EnumCallback);
2944}

◆ ddraw_surface3_EnumOverlayZOrders()

static HRESULT WINAPI ddraw_surface3_EnumOverlayZOrders ( IDirectDrawSurface3 *  iface,
DWORD  flags,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 3013 of file surface.c.

3015{
3016 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3017 struct callback_info info;
3018
3019 TRACE("iface %p, flags %#x, context %p, callback %p.\n", iface, flags, context, callback);
3020
3021 info.callback = callback;
3022 info.context = context;
3023
3026}

◆ ddraw_surface3_Flip()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Flip ( IDirectDrawSurface3 *  iface,
IDirectDrawSurface3 *  src,
DWORD  flags 
)
static

Definition at line 1371 of file surface.c.

1373{
1374 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
1376
1377 TRACE("iface %p, src %p, flags %#x.\n", iface, src, flags);
1378
1380 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, flags);
1381}

◆ ddraw_surface3_GetAttachedSurface()

static HRESULT WINAPI ddraw_surface3_GetAttachedSurface ( IDirectDrawSurface3 *  iface,
DDSCAPS caps,
IDirectDrawSurface3 **  attachment 
)
static

Definition at line 847 of file surface.c.

849{
850 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
851 struct ddraw_surface *attachment_impl;
852 IDirectDrawSurface7 *attachment7;
853 DDSCAPS2 caps2;
854 HRESULT hr;
855
856 TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, attachment);
857
858 caps2.dwCaps = caps->dwCaps;
859 caps2.dwCaps2 = 0;
860 caps2.dwCaps3 = 0;
861 caps2.u1.dwCaps4 = 0;
862
864 &caps2, &attachment7);
865 if (FAILED(hr))
866 {
867 *attachment = NULL;
868 return hr;
869 }
870 attachment_impl = impl_from_IDirectDrawSurface7(attachment7);
871 *attachment = &attachment_impl->IDirectDrawSurface3_iface;
873 ddraw_surface7_Release(attachment7);
874
875 return hr;
876}
static ULONG WINAPI ddraw_surface3_AddRef(IDirectDrawSurface3 *iface)
Definition: surface.c:371

◆ ddraw_surface3_GetBltStatus()

static HRESULT WINAPI ddraw_surface3_GetBltStatus ( IDirectDrawSurface3 *  iface,
DWORD  flags 
)
static

Definition at line 3091 of file surface.c.

3092{
3093 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3094
3095 TRACE("iface %p, flags %#x.\n", iface, flags);
3096
3098}

◆ ddraw_surface3_GetCaps()

static HRESULT WINAPI ddraw_surface3_GetCaps ( IDirectDrawSurface3 *  iface,
DDSCAPS caps 
)
static

Definition at line 2406 of file surface.c.

2407{
2408 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2409 DDSCAPS2 caps2;
2410 HRESULT hr;
2411
2412 TRACE("iface %p, caps %p.\n", iface, caps);
2413
2415 if (FAILED(hr)) return hr;
2416
2417 caps->dwCaps = caps2.dwCaps;
2418 return hr;
2419}

◆ ddraw_surface3_GetClipper()

static HRESULT WINAPI ddraw_surface3_GetClipper ( IDirectDrawSurface3 *  iface,
IDirectDrawClipper **  clipper 
)
static

Definition at line 4408 of file surface.c.

4409{
4410 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
4411
4412 TRACE("iface %p, clipper %p.\n", iface, clipper);
4413
4415}

◆ ddraw_surface3_GetColorKey()

static HRESULT WINAPI ddraw_surface3_GetColorKey ( IDirectDrawSurface3 *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 3200 of file surface.c.

3201{
3202 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3203
3204 TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
3205
3207}

◆ ddraw_surface3_GetDC()

static HRESULT WINAPI ddraw_surface3_GetDC ( IDirectDrawSurface3 *  iface,
HDC dc 
)
static

Definition at line 2269 of file surface.c.

2270{
2271 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2272
2273 TRACE("iface %p, dc %p.\n", iface, dc);
2274
2276}

◆ ddraw_surface3_GetDDInterface()

static HRESULT WINAPI ddraw_surface3_GetDDInterface ( IDirectDrawSurface3 *  iface,
void **  ddraw 
)
static

Definition at line 4107 of file surface.c.

4108{
4109 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
4110
4111 TRACE("iface %p, ddraw %p.\n", iface, ddraw);
4112
4114}

◆ ddraw_surface3_GetFlipStatus()

static HRESULT WINAPI ddraw_surface3_GetFlipStatus ( IDirectDrawSurface3 *  iface,
DWORD  flags 
)
static

Definition at line 3262 of file surface.c.

3263{
3264 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3265
3266 TRACE("iface %p, flags %#x.\n", iface, flags);
3267
3269}

◆ ddraw_surface3_GetOverlayPosition()

static HRESULT WINAPI ddraw_surface3_GetOverlayPosition ( IDirectDrawSurface3 *  iface,
LONG x,
LONG y 
)
static

Definition at line 3325 of file surface.c.

3326{
3327 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3328
3329 TRACE("iface %p, x %p, y %p.\n", iface, x, y);
3330
3332}

◆ ddraw_surface3_GetPalette()

static HRESULT WINAPI ddraw_surface3_GetPalette ( IDirectDrawSurface3 *  iface,
IDirectDrawPalette **  palette 
)
static

Definition at line 4748 of file surface.c.

4749{
4750 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
4751
4752 TRACE("iface %p, palette %p.\n", iface, palette);
4753
4755}

◆ ddraw_surface3_GetPixelFormat()

static HRESULT WINAPI ddraw_surface3_GetPixelFormat ( IDirectDrawSurface3 *  iface,
DDPIXELFORMAT pixel_format 
)
static

Definition at line 3392 of file surface.c.

3393{
3394 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3395
3396 TRACE("iface %p, pixel_format %p.\n", iface, pixel_format);
3397
3399}

◆ ddraw_surface3_GetSurfaceDesc()

static HRESULT WINAPI ddraw_surface3_GetSurfaceDesc ( IDirectDrawSurface3 *  iface,
DDSURFACEDESC surface_desc 
)
static

Definition at line 3466 of file surface.c.

3467{
3468 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3469
3470 TRACE("iface %p, surface_desc %p.\n", iface, surface_desc);
3471
3472 if (!surface_desc) return DDERR_INVALIDPARAMS;
3473
3474 if (surface_desc->dwSize != sizeof(DDSURFACEDESC))
3475 {
3476 WARN("Incorrect structure size %u, returning DDERR_INVALIDPARAMS.\n", surface_desc->dwSize);
3477 return DDERR_INVALIDPARAMS;
3478 }
3479
3482 TRACE("Returning surface desc:\n");
3483 if (TRACE_ON(ddraw))
3484 {
3485 /* DDRAW_dump_surface_desc handles the smaller size */
3487 }
3489
3490 return DD_OK;
3491}
void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd) DECLSPEC_HIDDEN
Definition: utils.c:864
#define TRACE_ON(x)
Definition: compat.h:75

Referenced by ddraw_surface1_GetSurfaceDesc(), and ddraw_surface2_GetSurfaceDesc().

◆ ddraw_surface3_Initialize()

static HRESULT WINAPI ddraw_surface3_Initialize ( IDirectDrawSurface3 *  iface,
IDirectDraw *  ddraw,
DDSURFACEDESC surface_desc 
)
static

Definition at line 3543 of file surface.c.

3545{
3546 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3547 DDSURFACEDESC2 surface_desc2;
3548
3549 TRACE("iface %p, ddraw %p, surface_desc %p.\n", iface, ddraw, surface_desc);
3550
3551 if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
3553 ddraw, surface_desc ? &surface_desc2 : NULL);
3554}

◆ ddraw_surface3_IsLost()

static HRESULT WINAPI ddraw_surface3_IsLost ( IDirectDrawSurface3 *  iface)
static

Definition at line 3633 of file surface.c.

3634{
3635 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3636
3637 TRACE("iface %p.\n", iface);
3638
3640}

◆ ddraw_surface3_Lock()

static HRESULT WINAPI ddraw_surface3_Lock ( IDirectDrawSurface3 *  iface,
RECT rect,
DDSURFACEDESC surface_desc,
DWORD  flags,
HANDLE  h 
)
static

Definition at line 1094 of file surface.c.

1096{
1097 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
1098 unsigned int surface_desc_size;
1099 DDSURFACEDESC2 surface_desc2;
1100 HRESULT hr;
1101
1102 TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
1104
1105 if (!surface_validate_lock_desc(surface, surface_desc, &surface_desc_size))
1106 return DDERR_INVALIDPARAMS;
1107
1108 surface_desc2.dwSize = surface_desc->dwSize;
1109 surface_desc2.dwFlags = 0;
1110 hr = surface_lock(surface, rect, &surface_desc2, surface_desc_size, flags, h);
1111 DDSD2_to_DDSD(&surface_desc2, surface_desc);
1112 surface_desc->dwSize = surface_desc2.dwSize;
1113 return hr;
1114}

◆ ddraw_surface3_PageLock()

static HRESULT WINAPI ddraw_surface3_PageLock ( IDirectDrawSurface3 *  iface,
DWORD  flags 
)
static

Definition at line 2696 of file surface.c.

2697{
2698 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2699
2700 TRACE("iface %p, flags %#x.\n", iface, flags);
2701
2703}

◆ ddraw_surface3_PageUnlock()

static HRESULT WINAPI ddraw_surface3_PageUnlock ( IDirectDrawSurface3 *  iface,
DWORD  flags 
)
static

Definition at line 2742 of file surface.c.

2743{
2744 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2745
2746 TRACE("iface %p, flags %#x.\n", iface, flags);
2747
2749}

◆ ddraw_surface3_QueryInterface()

static HRESULT WINAPI ddraw_surface3_QueryInterface ( IDirectDrawSurface3 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 260 of file surface.c.

261{
262 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
263
264 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
265
267}

◆ ddraw_surface3_Release()

static ULONG WINAPI ddraw_surface3_Release ( IDirectDrawSurface3 *  iface)
static

Definition at line 631 of file surface.c.

632{
634 ULONG refcount = InterlockedDecrement(&This->ref3);
635
636 TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
637
638 if (refcount == 0)
639 {
641 }
642
643 return refcount;
644}

◆ ddraw_surface3_ReleaseDC()

static HRESULT WINAPI ddraw_surface3_ReleaseDC ( IDirectDrawSurface3 *  iface,
HDC  dc 
)
static

Definition at line 2343 of file surface.c.

2344{
2345 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2346
2347 TRACE("iface %p, dc %p.\n", iface, dc);
2348
2350}

◆ ddraw_surface3_Restore()

static HRESULT WINAPI ddraw_surface3_Restore ( IDirectDrawSurface3 *  iface)
static

Definition at line 3725 of file surface.c.

3726{
3727 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3728
3729 TRACE("iface %p.\n", iface);
3730
3732}

◆ ddraw_surface3_SetClipper()

static HRESULT WINAPI ddraw_surface3_SetClipper ( IDirectDrawSurface3 *  iface,
IDirectDrawClipper *  clipper 
)
static

Definition at line 4504 of file surface.c.

4505{
4506 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
4507
4508 TRACE("iface %p, clipper %p.\n", iface, clipper);
4509
4511}

◆ ddraw_surface3_SetColorKey()

static HRESULT WINAPI ddraw_surface3_SetColorKey ( IDirectDrawSurface3 *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 4878 of file surface.c.

4879{
4880 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
4881
4882 TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
4883
4885}

◆ ddraw_surface3_SetOverlayPosition()

static HRESULT WINAPI ddraw_surface3_SetOverlayPosition ( IDirectDrawSurface3 *  iface,
LONG  x,
LONG  y 
)
static

Definition at line 3788 of file surface.c.

3789{
3790 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3791
3792 TRACE("iface %p, x %d, y %d.\n", iface, x, y);
3793
3795}

◆ ddraw_surface3_SetPalette()

static HRESULT WINAPI ddraw_surface3_SetPalette ( IDirectDrawSurface3 *  iface,
IDirectDrawPalette *  palette 
)
static

Definition at line 4937 of file surface.c.

4938{
4939 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
4940
4941 TRACE("iface %p, palette %p.\n", iface, palette);
4942
4943 if (IDirectDrawSurface3_IsLost(iface) == DDERR_SURFACELOST)
4944 {
4945 WARN("Surface lost, returning DDERR_SURFACELOST.\n");
4946 return DDERR_SURFACELOST;
4947 }
4948
4949 return ddraw_surface_set_palette(surface, palette);
4950}

◆ ddraw_surface3_SetSurfaceDesc()

static HRESULT WINAPI ddraw_surface3_SetSurfaceDesc ( IDirectDrawSurface3 *  iface,
DDSURFACEDESC surface_desc,
DWORD  flags 
)
static

Definition at line 4694 of file surface.c.

4696{
4697 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
4698 DDSURFACEDESC2 surface_desc2;
4699
4700 TRACE("iface %p, surface_desc %p, flags %#x.\n", iface, surface_desc, flags);
4701
4702 if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
4704 surface_desc ? &surface_desc2 : NULL, flags);
4705}
static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, DDSURFACEDESC2 *DDSD, DWORD Flags)
Definition: surface.c:4547

◆ ddraw_surface3_Unlock()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Unlock ( IDirectDrawSurface3 *  iface,
void data 
)
static

Definition at line 1197 of file surface.c.

1198{
1199 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
1200
1201 TRACE("iface %p, data %p.\n", iface, data);
1202
1203 /* data might not be the LPRECT of later versions, so drop it. */
1205}

◆ ddraw_surface3_UpdateOverlay()

static HRESULT WINAPI ddraw_surface3_UpdateOverlay ( IDirectDrawSurface3 *  iface,
RECT src_rect,
IDirectDrawSurface3 *  dst_surface,
RECT dst_rect,
DWORD  flags,
DDOVERLAYFX fx 
)
static

Definition at line 3878 of file surface.c.

3880{
3881 struct ddraw_surface *src_impl = impl_from_IDirectDrawSurface3(iface);
3882 struct ddraw_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface3(dst_surface);
3883
3884 TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#x, fx %p.\n",
3885 iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
3886
3887 return ddraw_surface7_UpdateOverlay(&src_impl->IDirectDrawSurface7_iface, src_rect,
3888 dst_impl ? &dst_impl->IDirectDrawSurface7_iface : NULL, dst_rect, flags, fx);
3889}

◆ ddraw_surface3_UpdateOverlayDisplay()

static HRESULT WINAPI ddraw_surface3_UpdateOverlayDisplay ( IDirectDrawSurface3 *  iface,
DWORD  flags 
)
static

Definition at line 3944 of file surface.c.

3945{
3946 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
3947
3948 TRACE("iface %p, flags %#x.\n", iface, flags);
3949
3951}

◆ ddraw_surface3_UpdateOverlayZOrder()

static HRESULT WINAPI ddraw_surface3_UpdateOverlayZOrder ( IDirectDrawSurface3 *  iface,
DWORD  flags,
IDirectDrawSurface3 *  reference 
)
static

Definition at line 4015 of file surface.c.

4017{
4018 struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
4020
4021 TRACE("iface %p, flags %#x, reference %p.\n", iface, flags, reference);
4022
4024 reference_impl ? &reference_impl->IDirectDrawSurface7_iface : NULL);
4025}

◆ ddraw_surface4_AddAttachedSurface()

static HRESULT WINAPI ddraw_surface4_AddAttachedSurface ( IDirectDrawSurface4 *  iface,
IDirectDrawSurface4 *  attachment 
)
static

Definition at line 1914 of file surface.c.

1915{
1916 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
1918 HRESULT hr;
1919
1920 TRACE("iface %p, attachment %p.\n", iface, attachment);
1921
1922 /* Tests suggest that
1923 * -> offscreen plain surfaces can be attached to other offscreen plain surfaces
1924 * -> offscreen plain surfaces can be attached to primaries
1925 * -> primaries can be attached to offscreen plain surfaces
1926 * -> z buffers can be attached to primaries */
1929 {
1930 /* Sizes have to match */
1931 if (attachment_impl->surface_desc.dwWidth != surface->surface_desc.dwWidth
1932 || attachment_impl->surface_desc.dwHeight != surface->surface_desc.dwHeight)
1933 {
1934 WARN("Surface sizes do not match.\n");
1936 }
1937 }
1939 || !(attachment_impl->surface_desc.ddsCaps.dwCaps & (DDSCAPS_ZBUFFER)))
1940 {
1941 WARN("Invalid attachment combination.\n");
1943 }
1944
1945 if (FAILED(hr = ddraw_surface_attach_surface(surface, attachment_impl)))
1946 return hr;
1947
1948 attachment_impl->attached_iface = (IUnknown *)attachment;
1949 IUnknown_AddRef(attachment_impl->attached_iface);
1950 return hr;
1951}
static struct ddraw_surface * impl_from_IDirectDrawSurface4(IDirectDrawSurface4 *iface)
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface4(IDirectDrawSurface4 *iface)
Definition: surface.c:5657
static HRESULT ddraw_surface_attach_surface(struct ddraw_surface *This, struct ddraw_surface *Surf)
Definition: surface.c:1851
#define DDSCAPS_ZBUFFER
Definition: ddraw.h:267
#define DDERR_CANNOTATTACHSURFACE
Definition: ddraw.h:68
#define DDSCAPS_OFFSCREENPLAIN
Definition: ddraw.h:255
#define DDSCAPS_3DDEVICE
Definition: ddraw.h:263

Referenced by ddraw_surface1_AddAttachedSurface(), ddraw_surface2_AddAttachedSurface(), and ddraw_surface3_AddAttachedSurface().

◆ ddraw_surface4_AddOverlayDirtyRect()

static HRESULT WINAPI ddraw_surface4_AddOverlayDirtyRect ( IDirectDrawSurface4 *  iface,
RECT rect 
)
static

Definition at line 2159 of file surface.c.

2160{
2161 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2162
2163 TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
2164
2166}

◆ ddraw_surface4_AddRef()

static ULONG WINAPI ddraw_surface4_AddRef ( IDirectDrawSurface4 *  iface)
static

Definition at line 356 of file surface.c.

357{
359 ULONG refcount = InterlockedIncrement(&This->ref4);
360
361 TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
362
363 if (refcount == 1)
364 {
366 }
367
368 return refcount;
369}

Referenced by ddraw_surface4_GetAttachedSurface(), and EnumCallback2().

◆ ddraw_surface4_Blt()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Blt ( IDirectDrawSurface4 *  iface,
RECT dst_rect,
IDirectDrawSurface4 *  src_surface,
RECT src_rect,
DWORD  flags,
DDBLTFX fx 
)
static

Definition at line 1755 of file surface.c.

1757{
1760
1761 TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
1762 iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
1763
1764 return ddraw_surface7_Blt(&dst->IDirectDrawSurface7_iface, dst_rect,
1765 src ? &src->IDirectDrawSurface7_iface : NULL, src_rect, flags, fx);
1766}

◆ ddraw_surface4_BltBatch()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_BltBatch ( IDirectDrawSurface4 *  iface,
DDBLTBATCH batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 2780 of file surface.c.

2781{
2782 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2783
2784 TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags);
2785
2787}

◆ ddraw_surface4_BltFast()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_BltFast ( IDirectDrawSurface4 *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface4 *  src_surface,
RECT src_rect,
DWORD  flags 
)
static

Definition at line 4309 of file surface.c.

4311{
4312 struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface4(iface);
4313 struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface4(src_surface);
4314
4315 TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
4316 iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
4317
4318 return ddraw_surface7_BltFast(&dst_impl->IDirectDrawSurface7_iface, dst_x, dst_y,
4319 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags);
4320}

◆ ddraw_surface4_ChangeUniquenessValue()

static HRESULT WINAPI ddraw_surface4_ChangeUniquenessValue ( IDirectDrawSurface4 *  iface)
static

Definition at line 4132 of file surface.c.

4133{
4134 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
4135
4136 TRACE("iface %p.\n", iface);
4137
4139}
static HRESULT WINAPI ddraw_surface7_ChangeUniquenessValue(IDirectDrawSurface7 *iface)
Definition: surface.c:4125

◆ ddraw_surface4_DeleteAttachedSurface()

static HRESULT WINAPI ddraw_surface4_DeleteAttachedSurface ( IDirectDrawSurface4 *  iface,
DWORD  flags,
IDirectDrawSurface4 *  attachment 
)
static

Definition at line 2096 of file surface.c.

2098{
2099 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2101
2102 TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment);
2103
2104 return ddraw_surface_delete_attached_surface(surface, attachment_impl, (IUnknown *)attachment);
2105}

◆ ddraw_surface4_EnumAttachedSurfaces()

static HRESULT WINAPI ddraw_surface4_EnumAttachedSurfaces ( IDirectDrawSurface4 *  iface,
void context,
LPDDENUMSURFACESCALLBACK2  callback 
)
static

Definition at line 2916 of file surface.c.

2918{
2919 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2920 struct callback_info2 info;
2921
2922 TRACE("iface %p, context %p, callback %p.\n", iface, context, callback);
2923
2924 info.callback = callback;
2925 info.context = context;
2926
2929}
static HRESULT CALLBACK EnumCallback2(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: surface.c:2892
void * context
Definition: surface.c:2883

◆ ddraw_surface4_EnumOverlayZOrders()

static HRESULT WINAPI ddraw_surface4_EnumOverlayZOrders ( IDirectDrawSurface4 *  iface,
DWORD  flags,
void context,
LPDDENUMSURFACESCALLBACK2  callback 
)
static

Definition at line 2998 of file surface.c.

3000{
3001 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
3002 struct callback_info2 info;
3003
3004 TRACE("iface %p, flags %#x, context %p, callback %p.\n", iface, flags, context, callback);
3005
3006 info.callback = callback;
3007 info.context = context;
3008
3011}

◆ ddraw_surface4_Flip()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Flip ( IDirectDrawSurface4 *  iface,
IDirectDrawSurface4 *  src,
DWORD  flags 
)
static

Definition at line 1359 of file surface.c.

1361{
1362 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
1364
1365 TRACE("iface %p, src %p, flags %#x.\n", iface, src, flags);
1366
1368 src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, flags);
1369}

◆ ddraw_surface4_FreePrivateData()

static HRESULT WINAPI ddraw_surface4_FreePrivateData ( IDirectDrawSurface4 *  iface,
REFGUID  tag 
)
static

Definition at line 2658 of file surface.c.

2659{
2660 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2661
2662 TRACE("iface %p, tag %s.\n", iface, debugstr_guid(tag));
2663
2665}
static HRESULT WINAPI ddraw_surface7_FreePrivateData(IDirectDrawSurface7 *iface, REFGUID tag)
Definition: surface.c:2637
Definition: ecma_167.h:138

◆ ddraw_surface4_GetAttachedSurface()

static HRESULT WINAPI ddraw_surface4_GetAttachedSurface ( IDirectDrawSurface4 *  iface,
DDSCAPS2 caps,
IDirectDrawSurface4 **  attachment 
)
static

Definition at line 822 of file surface.c.

824{
825 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
826 struct ddraw_surface *attachment_impl;
827 IDirectDrawSurface7 *attachment7;
828 HRESULT hr;
829
830 TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, attachment);
831
833 caps, &attachment7);
834 if (FAILED(hr))
835 {
836 *attachment = NULL;
837 return hr;
838 }
839 attachment_impl = impl_from_IDirectDrawSurface7(attachment7);
840 *attachment = &attachment_impl->IDirectDrawSurface4_iface;
842 ddraw_surface7_Release(attachment7);
843
844 return hr;
845}
static ULONG WINAPI ddraw_surface4_AddRef(IDirectDrawSurface4 *iface)
Definition: surface.c:356

◆ ddraw_surface4_GetBltStatus()

static HRESULT WINAPI ddraw_surface4_GetBltStatus ( IDirectDrawSurface4 *  iface,
DWORD  flags 
)
static

Definition at line 3082 of file surface.c.

3083{
3084 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
3085
3086 TRACE("iface %p, flags %#x.\n", iface, flags);
3087
3089}

◆ ddraw_surface4_GetCaps()

static HRESULT WINAPI ddraw_surface4_GetCaps ( IDirectDrawSurface4 *  iface,
DDSCAPS2 caps 
)
static

Definition at line 2397 of file surface.c.

2398{
2399 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2400
2401 TRACE("iface %p, caps %p.\n", iface, caps);
2402
2403 return ddraw_surface7_GetCaps(&surface->IDirectDrawSurface7_iface, caps);
2404}

◆ ddraw_surface4_GetClipper()

static HRESULT WINAPI ddraw_surface4_GetClipper ( IDirectDrawSurface4 *  iface,
IDirectDrawClipper **  clipper 
)
static

Definition at line 4399 of file surface.c.

4400{
4401 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
4402
4403 TRACE("iface %p, clipper %p.\n", iface, clipper);
4404
4406}

◆ ddraw_surface4_GetColorKey()

static HRESULT WINAPI ddraw_surface4_GetColorKey ( IDirectDrawSurface4 *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 3191 of file surface.c.

3192{
3193 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
3194
3195 TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
3196
3198}

◆ ddraw_surface4_GetDC()

static HRESULT WINAPI ddraw_surface4_GetDC ( IDirectDrawSurface4 *  iface,
HDC dc 
)
static

Definition at line 2260 of file surface.c.

2261{
2262 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2263
2264 TRACE("iface %p, dc %p.\n", iface, dc);
2265
2267}

◆ ddraw_surface4_GetDDInterface()

static HRESULT WINAPI ddraw_surface4_GetDDInterface ( IDirectDrawSurface4 *  iface,
void **  ddraw 
)
static

Definition at line 4098 of file surface.c.

4099{
4100 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
4101
4102 TRACE("iface %p, ddraw %p.\n", iface, ddraw);
4103
4105}

◆ ddraw_surface4_GetFlipStatus()

static HRESULT WINAPI ddraw_surface4_GetFlipStatus ( IDirectDrawSurface4 *  iface,
DWORD  flags 
)
static

Definition at line 3253 of file surface.c.

3254{
3255 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
3256
3257 TRACE("iface %p, flags %#x.\n", iface, flags);
3258
3260}

◆ ddraw_surface4_GetOverlayPosition()

static HRESULT WINAPI ddraw_surface4_GetOverlayPosition ( IDirectDrawSurface4 *  iface,
LONG x,
LONG y 
)
static

Definition at line 3316 of file surface.c.

3317{
3318 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
3319
3320 TRACE("iface %p, x %p, y %p.\n", iface, x, y);
3321
3323}

◆ ddraw_surface4_GetPalette()

static HRESULT WINAPI ddraw_surface4_GetPalette ( IDirectDrawSurface4 *  iface,
IDirectDrawPalette **  palette 
)
static

Definition at line 4739 of file surface.c.

4740{
4741 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
4742
4743 TRACE("iface %p, palette %p.\n", iface, palette);
4744
4746}

◆ ddraw_surface4_GetPixelFormat()

static HRESULT WINAPI ddraw_surface4_GetPixelFormat ( IDirectDrawSurface4 *  iface,
DDPIXELFORMAT pixel_format 
)
static

Definition at line 3383 of file surface.c.

3384{
3385 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
3386
3387 TRACE("iface %p, pixel_format %p.\n", iface, pixel_format);
3388
3390}

◆ ddraw_surface4_GetPrivateData()

static HRESULT WINAPI ddraw_surface4_GetPrivateData ( IDirectDrawSurface4 *  iface,
REFGUID  tag,
void data,
DWORD size 
)
static

Definition at line 2615 of file surface.c.

2616{
2617 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2618
2619 TRACE("iface %p, tag %s, data %p, data_size %p.\n",
2620 iface, debugstr_guid(tag), data, size);
2621
2623}
static HRESULT WINAPI ddraw_surface7_GetPrivateData(IDirectDrawSurface7 *iface, REFGUID tag, void *data, DWORD *size)
Definition: surface.c:2573
GLsizeiptr size
Definition: glext.h:5919

◆ ddraw_surface4_GetSurfaceDesc()

static HRESULT WINAPI ddraw_surface4_GetSurfaceDesc ( IDirectDrawSurface4 *  iface,
DDSURFACEDESC2 DDSD 
)
static

Definition at line 3457 of file surface.c.

3458{
3459 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
3460
3461 TRACE("iface %p, surface_desc %p.\n", iface, DDSD);
3462
3464}
static HRESULT WINAPI ddraw_surface7_GetSurfaceDesc(IDirectDrawSurface7 *iface, DDSURFACEDESC2 *DDSD)
Definition: surface.c:3433

◆ ddraw_surface4_GetUniquenessValue()

static HRESULT WINAPI ddraw_surface4_GetUniquenessValue ( IDirectDrawSurface4 *  iface,
DWORD pValue 
)
static

Definition at line 4150 of file surface.c.

4151{
4152 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
4153
4154 TRACE("iface %p, value %p.\n", iface, pValue);
4155
4157}
static HRESULT WINAPI ddraw_surface7_GetUniquenessValue(IDirectDrawSurface7 *iface, DWORD *pValue)
Definition: surface.c:4141
PWCHAR pValue

◆ ddraw_surface4_Initialize()

static HRESULT WINAPI ddraw_surface4_Initialize ( IDirectDrawSurface4 *  iface,
IDirectDraw *  ddraw,
DDSURFACEDESC2 surface_desc 
)
static

Definition at line 3532 of file surface.c.

3534{
3535 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
3536
3537 TRACE("iface %p, ddraw %p, surface_desc %p.\n", iface, ddraw, surface_desc);
3538
3541}

◆ ddraw_surface4_IsLost()

static HRESULT WINAPI ddraw_surface4_IsLost ( IDirectDrawSurface4 *  iface)
static

Definition at line 3624 of file surface.c.

3625{
3626 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
3627
3628 TRACE("iface %p.\n", iface);
3629
3631}

◆ ddraw_surface4_Lock()

static HRESULT WINAPI ddraw_surface4_Lock ( IDirectDrawSurface4 *  iface,
RECT rect,
DDSURFACEDESC2 surface_desc,
DWORD  flags,
HANDLE  h 
)
static

Definition at line 1079 of file surface.c.

1081{
1082 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
1083 unsigned int surface_desc_size;
1084
1085 TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
1087
1088 if (!surface_validate_lock_desc(surface, (DDSURFACEDESC *)surface_desc, &surface_desc_size))
1089 return DDERR_INVALIDPARAMS;
1090
1091 return surface_lock(surface, rect, surface_desc, surface_desc_size, flags, h);
1092}

◆ ddraw_surface4_PageLock()

static HRESULT WINAPI ddraw_surface4_PageLock ( IDirectDrawSurface4 *  iface,
DWORD  flags 
)
static

Definition at line 2687 of file surface.c.

2688{
2689 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2690
2691 TRACE("iface %p, flags %#x.\n", iface, flags);
2692
2694}

◆ ddraw_surface4_PageUnlock()

static HRESULT WINAPI ddraw_surface4_PageUnlock ( IDirectDrawSurface4 *  iface,
DWORD  flags 
)
static

Definition at line 2733 of file surface.c.

2734{
2735 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2736
2737 TRACE("iface %p, flags %#x.\n", iface, flags);
2738
2740}

◆ ddraw_surface4_QueryInterface()

static HRESULT WINAPI ddraw_surface4_QueryInterface ( IDirectDrawSurface4 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 251 of file surface.c.

252{
253 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
254
255 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
256
258}

◆ ddraw_surface4_Release()

static ULONG WINAPI ddraw_surface4_Release ( IDirectDrawSurface4 *  iface)
static

Definition at line 616 of file surface.c.

617{
619 ULONG refcount = InterlockedDecrement(&This->ref4);
620
621 TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
622
623 if (refcount == 0)
624 {
626 }
627
628 return refcount;
629}

Referenced by ddraw_surface1_AddAttachedSurface(), ddraw_surface2_AddAttachedSurface(), and ddraw_surface3_AddAttachedSurface().

◆ ddraw_surface4_ReleaseDC()

static HRESULT WINAPI ddraw_surface4_ReleaseDC ( IDirectDrawSurface4 *  iface,
HDC  dc 
)
static

Definition at line 2334 of file surface.c.

2335{
2336 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
2337
2338 TRACE("iface %p, dc %p.\n", iface, dc);
2339
2341}

◆ ddraw_surface4_Restore()

static HRESULT WINAPI ddraw_surface4_Restore ( IDirectDrawSurface4 *  iface)
static

Definition at line 3716 of file surface.c.

3717{
3718 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
3719
3720 TRACE("iface %p.\n", iface);
3721
3723}

◆ ddraw_surface4_SetClipper()

static HRESULT WINAPI ddraw_surface4_SetClipper ( IDirectDrawSurface4 *  iface,
IDirectDrawClipper *  clipper 
)
static

Definition at line 4495 of file surface.c.

4496{
4497 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
4498
4499 TRACE("iface %p, clipper %p.\n", iface, clipper);
4500
4502}

◆ ddraw_surface4_SetColorKey()

static HRESULT WINAPI ddraw_surface4_SetColorKey ( IDirectDrawSurface4 *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 4869 of file surface.c.

4870{
4871 struct ddraw_surface *surface = impl_from_IDirectDrawSurface4(iface);
4872
4873 TRACE(