52 if (!
device->d3d_parent->extended)
54 WARN(
"IDirect3D9 instance wasn't created with CreateDirect3D9Ex, returning E_NOINTERFACE.\n");
97 WARN(
"Swapchain does not have any references.\n");
121 const RECT *src_rect,
const RECT *dst_rect,
HWND dst_window_override,
128 TRACE(
"iface %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p, flags %#x.\n",
130 dst_window_override, dirty_region,
flags);
136 FIXME(
"Ignoring dirty_region %p.\n", dirty_region);
140 src_rect, dst_rect, dst_window_override, 0,
flags);
152 TRACE(
"iface %p, surface %p.\n", iface, surface);
169 TRACE(
"iface %p, backbuffer_idx %u, backbuffer_type %#x, backbuffer %p.\n",
170 iface, backbuffer_idx, backbuffer_type, backbuffer);
176 WARN(
"The output pointer is NULL, returning D3DERR_INVALIDCALL.\n");
202 TRACE(
"iface %p, raster_status %p.\n", iface, raster_status);
218 TRACE(
"iface %p, mode %p.\n", iface,
mode);
255 TRACE(
"iface %p, parameters %p.\n", iface, parameters);
266 UINT *last_present_count)
268 FIXME(
"iface %p, last_present_count %p, stub!\n", iface, last_present_count);
270 if (last_present_count)
271 *last_present_count = 0;
279 FIXME(
"iface %p, present_stats %p, stub!\n", iface, present_stats);
282 memset(present_stats, 0,
sizeof(*present_stats));
294 TRACE(
"iface %p, mode %p, rotation %p.\n", iface,
mode, rotation);
361 WARN(
"Failed to create wined3d swapchain, hr %#x.\n",
hr);
377 if (!(
object = heap_alloc_zero(
sizeof(*
object))))
382 WARN(
"Failed to initialize swapchain, hr %#x.\n",
hr);
387 TRACE(
"Created swapchain %p.\n",
object);
#define DECLSPEC_HOTPATCH
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define STDMETHODCALLTYPE
static HRESULT swapchain_init(struct d3d8_swapchain *swapchain, struct d3d8_device *device, struct wined3d_swapchain_desc *desc)
D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN
enum _D3DBACKBUFFER_TYPE D3DBACKBUFFER_TYPE
static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_swapchain_Present(IDirect3DSwapChain9Ex *iface, const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, const RGNDATA *dirty_region, DWORD flags)
static HRESULT WINAPI d3d9_swapchain_GetLastPresentCount(IDirect3DSwapChain9Ex *iface, UINT *last_present_count)
static HRESULT WINAPI d3d9_swapchain_GetDevice(IDirect3DSwapChain9Ex *iface, IDirect3DDevice9 **device)
static void STDMETHODCALLTYPE d3d9_swapchain_wined3d_object_released(void *parent)
static const struct IDirect3DSwapChain9ExVtbl d3d9_swapchain_vtbl
HRESULT d3d9_swapchain_create(struct d3d9_device *device, struct wined3d_swapchain_desc *desc, struct d3d9_swapchain **swapchain)
static ULONG WINAPI d3d9_swapchain_Release(IDirect3DSwapChain9Ex *iface)
static HRESULT WINAPI d3d9_swapchain_GetPresentParameters(IDirect3DSwapChain9Ex *iface, D3DPRESENT_PARAMETERS *parameters)
static struct d3d9_swapchain * impl_from_IDirect3DSwapChain9Ex(IDirect3DSwapChain9Ex *iface)
static HRESULT WINAPI d3d9_swapchain_GetRasterStatus(IDirect3DSwapChain9Ex *iface, D3DRASTER_STATUS *raster_status)
static HRESULT WINAPI d3d9_swapchain_GetFrontBufferData(IDirect3DSwapChain9Ex *iface, IDirect3DSurface9 *surface)
static HRESULT WINAPI d3d9_swapchain_GetBackBuffer(IDirect3DSwapChain9Ex *iface, UINT backbuffer_idx, D3DBACKBUFFER_TYPE backbuffer_type, IDirect3DSurface9 **backbuffer)
static HRESULT WINAPI d3d9_swapchain_GetPresentStatistics(IDirect3DSwapChain9Ex *iface, D3DPRESENTSTATS *present_stats)
static HRESULT WINAPI d3d9_swapchain_GetDisplayModeEx(IDirect3DSwapChain9Ex *iface, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation)
static ULONG WINAPI d3d9_swapchain_AddRef(IDirect3DSwapChain9Ex *iface)
static const struct wined3d_parent_ops d3d9_swapchain_wined3d_parent_ops
static HRESULT WINAPI d3d9_swapchain_GetDisplayMode(IDirect3DSwapChain9Ex *iface, D3DDISPLAYMODE *mode)
static HRESULT WINAPI d3d9_swapchain_QueryInterface(IDirect3DSwapChain9Ex *iface, REFIID riid, void **out)
#define IDirect3DSwapChain9Ex_AddRef(p)
#define IDirect3DDevice9Ex_Release(p)
#define S_PRESENT_OCCLUDED
#define IDirect3DSurface9_AddRef(p)
#define IDirect3DDevice9Ex_AddRef(p)
#define IDirect3DDevice9_AddRef(p)
#define D3DERR_INVALIDCALL
static void present_parameters_from_wined3d_swapchain_desc(D3DPRESENT_PARAMETERS *present_parameters, const struct wined3d_swapchain_desc *swapchain_desc)
void *CDECL wined3d_texture_get_sub_resource_parent(struct wined3d_texture *texture, unsigned int sub_resource_idx)
static const WCHAR desc[]
#define IsEqualGUID(rguid1, rguid2)
#define D3DERR_DEVICELOST
IDirect3DSurface9 IDirect3DSurface9_iface
IDirect3DSwapChain9Ex IDirect3DSwapChain9Ex_iface
IDirect3DDevice9Ex * parent_device
struct wined3d_swapchain * wined3d_swapchain
enum wined3d_format_id format_id
enum wined3d_scanline_ordering scanline_ordering
#define CONTAINING_RECORD(address, type, field)
static struct d3d9_device * impl_from_IDirect3DDevice9Ex(IDirect3DDevice9Ex *iface)
struct d3d9_surface * unsafe_impl_from_IDirect3DSurface9(IDirect3DSurface9 *iface) DECLSPEC_HIDDEN
struct wined3d_texture *CDECL wined3d_swapchain_get_back_buffer(const struct wined3d_swapchain *swapchain, UINT back_buffer_idx)
void CDECL wined3d_swapchain_get_desc(const struct wined3d_swapchain *swapchain, struct wined3d_swapchain_desc *desc)
HRESULT CDECL wined3d_swapchain_get_raster_status(const struct wined3d_swapchain *swapchain, struct wined3d_raster_status *raster_status)
HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain, const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD swap_interval, DWORD flags)
ULONG CDECL wined3d_swapchain_decref(struct wined3d_swapchain *swapchain)
ULONG CDECL wined3d_swapchain_incref(struct wined3d_swapchain *swapchain)
HRESULT CDECL wined3d_swapchain_get_front_buffer_data(const struct wined3d_swapchain *swapchain, struct wined3d_texture *dst_texture, unsigned int sub_resource_idx)
HRESULT CDECL wined3d_swapchain_get_display_mode(const struct wined3d_swapchain *swapchain, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
HRESULT CDECL wined3d_swapchain_create(struct wined3d_device *device, struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_swapchain **swapchain)
void WINAPI wined3d_mutex_unlock(void)
void WINAPI wined3d_mutex_lock(void)