quartz: Get rid of the SetDefault*Rect callbacks.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cab14ee04c
commit
69011b3711
|
@ -112,8 +112,6 @@ struct video_window_ops
|
|||
BOOL (*resize)(struct video_window *window, LONG height, LONG width);
|
||||
|
||||
HRESULT (*get_current_image)(struct video_window *window, LONG *size, LONG *image);
|
||||
HRESULT (WINAPI *pfnSetDefaultSourceRect)(struct video_window *window);
|
||||
HRESULT (WINAPI *pfnSetDefaultTargetRect)(struct video_window *window);
|
||||
};
|
||||
|
||||
void video_window_cleanup(struct video_window *window) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -314,35 +314,11 @@ static HRESULT video_renderer_get_current_image(struct video_window *iface, LONG
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI VideoRenderer_SetDefaultSourceRect(struct video_window *iface)
|
||||
{
|
||||
struct video_renderer *This = impl_from_video_window(iface);
|
||||
|
||||
SetRect(&This->window.src, 0, 0, This->VideoWidth, This->VideoHeight);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI VideoRenderer_SetDefaultTargetRect(struct video_window *iface)
|
||||
{
|
||||
struct video_renderer *This = impl_from_video_window(iface);
|
||||
RECT rect;
|
||||
|
||||
if (!GetClientRect(This->window.hwnd, &rect))
|
||||
return E_FAIL;
|
||||
|
||||
SetRect(&This->window.dst, 0, 0, rect.right, rect.bottom);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const struct video_window_ops window_ops =
|
||||
{
|
||||
.get_default_rect = video_renderer_get_default_rect,
|
||||
.resize = video_renderer_resize,
|
||||
.get_current_image = video_renderer_get_current_image,
|
||||
.pfnSetDefaultSourceRect = VideoRenderer_SetDefaultSourceRect,
|
||||
.pfnSetDefaultTargetRect = VideoRenderer_SetDefaultTargetRect,
|
||||
};
|
||||
|
||||
static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface,
|
||||
|
|
|
@ -734,35 +734,11 @@ out:
|
|||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI VMR9_SetDefaultSourceRect(struct video_window *iface)
|
||||
{
|
||||
struct quartz_vmr *filter = impl_from_video_window(iface);
|
||||
|
||||
SetRect(&filter->window.src, 0, 0, filter->VideoWidth, filter->VideoHeight);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI VMR9_SetDefaultTargetRect(struct video_window *iface)
|
||||
{
|
||||
RECT rect;
|
||||
struct quartz_vmr *filter = impl_from_video_window(iface);
|
||||
|
||||
if (!GetClientRect(filter->window.hwnd, &rect))
|
||||
return E_FAIL;
|
||||
|
||||
SetRect(&filter->window.dst, 0, 0, rect.right, rect.bottom);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const struct video_window_ops window_ops =
|
||||
{
|
||||
.get_default_rect = vmr_get_default_rect,
|
||||
.resize = vmr_resize,
|
||||
.get_current_image = vmr_get_current_image,
|
||||
.pfnSetDefaultSourceRect = VMR9_SetDefaultSourceRect,
|
||||
.pfnSetDefaultTargetRect = VMR9_SetDefaultTargetRect,
|
||||
};
|
||||
|
||||
static const IVideoWindowVtbl IVideoWindow_VTable =
|
||||
|
|
|
@ -1055,10 +1055,12 @@ static HRESULT WINAPI basic_video_GetSourcePosition(IBasicVideo *iface,
|
|||
static HRESULT WINAPI basic_video_SetDefaultSourcePosition(IBasicVideo *iface)
|
||||
{
|
||||
struct video_window *window = impl_from_IBasicVideo(iface);
|
||||
const BITMAPINFOHEADER *bitmap_header = get_bitmap_header(window);
|
||||
|
||||
TRACE("window %p.\n", window);
|
||||
|
||||
return window->ops->pfnSetDefaultSourceRect(window);
|
||||
SetRect(&window->src, 0, 0, bitmap_header->biWidth, bitmap_header->biHeight);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI basic_video_SetDestinationPosition(IBasicVideo *iface,
|
||||
|
@ -1098,7 +1100,8 @@ static HRESULT WINAPI basic_video_SetDefaultDestinationPosition(IBasicVideo *ifa
|
|||
|
||||
TRACE("window %p.\n", window);
|
||||
|
||||
return window->ops->pfnSetDefaultTargetRect(window);
|
||||
GetClientRect(window->hwnd, &window->dst);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI basic_video_GetVideoSize(IBasicVideo *iface, LONG *width, LONG *height)
|
||||
|
|
Loading…
Reference in New Issue