Commit 284900dc authored by Laurent Aimar's avatar Laurent Aimar

Converted wingdi/wingapi to vout display.

parent 72974fc1
...@@ -24,16 +24,16 @@ SOURCES_glwin32 = \ ...@@ -24,16 +24,16 @@ SOURCES_glwin32 = \
SOURCES_wingdi = \ SOURCES_wingdi = \
wingdi.c \ wingdi.c \
vout.h \ common.h \
events_vo.h \ events.h \
events_vo.c \ events.c \
common_vo.c \ common.c \
$(NULL) $(NULL)
SOURCES_wingapi = \ SOURCES_wingapi = \
wingdi.c \ wingdi.c \
vout.h \ vout.h \
events_vo.h \ events.h \
events_vo.c \ events.c \
common_vo.c \ common.c \
$(NULL) $(NULL)
...@@ -169,7 +169,7 @@ void CommonManage(vout_display_t *vd) ...@@ -169,7 +169,7 @@ void CommonManage(vout_display_t *vd)
/* FIXME I find such #ifdef quite weirds. Are they really needed ? */ /* FIXME I find such #ifdef quite weirds. Are they really needed ? */
#if defined(MODULE_NAME_IS_direct3d) #if defined(MODULE_NAME_IS_direct3d) || defined(MODULE_NAME_IS_wingdi) || defined(MODULE_NAME_IS_wingapi)
SetWindowPos(sys->hwnd, 0, 0, 0, SetWindowPos(sys->hwnd, 0, 0, 0,
rect_parent.right - rect_parent.left, rect_parent.right - rect_parent.left,
rect_parent.bottom - rect_parent.top, rect_parent.bottom - rect_parent.top,
...@@ -186,15 +186,6 @@ void CommonManage(vout_display_t *vd) ...@@ -186,15 +186,6 @@ void CommonManage(vout_display_t *vd)
rect_parent.right - rect_parent.left, rect_parent.right - rect_parent.left,
rect_parent.bottom - rect_parent.top, 0); rect_parent.bottom - rect_parent.top, 0);
#if defined(MODULE_NAME_IS_wingdi) || defined(MODULE_NAME_IS_wingapi)
unsigned int i_x, i_y, i_width, i_height;
vout_PlacePicture(vd, rect_parent.right - rect_parent.left,
rect_parent.bottom - rect_parent.top,
&i_x, &i_y, &i_width, &i_height);
SetWindowPos(sys->hvideownd, HWND_TOP,
i_x, i_y, i_width, i_height, 0);
#endif
#endif #endif
} }
} }
...@@ -271,7 +262,9 @@ void UpdateRects(vout_display_t *vd, ...@@ -271,7 +262,9 @@ void UpdateRects(vout_display_t *vd,
EventThreadUpdateWindowPosition(sys->event, &has_moved, &is_resized, EventThreadUpdateWindowPosition(sys->event, &has_moved, &is_resized,
point.x, point.y, point.x, point.y,
rect.right, rect.bottom); rect.right, rect.bottom);
if (!is_forced && !has_moved && !is_resized) if (is_resized)
vout_display_SendEventDisplaySize(vd, rect.right, rect.bottom, cfg->is_fullscreen);
if (!is_forced && !has_moved && !is_resized )
return; return;
/* Update the window position and size */ /* Update the window position and size */
...@@ -283,6 +276,10 @@ void UpdateRects(vout_display_t *vd, ...@@ -283,6 +276,10 @@ void UpdateRects(vout_display_t *vd,
vout_display_PlacePicture(&place, source, &place_cfg, true); vout_display_PlacePicture(&place, source, &place_cfg, true);
EventThreadUpdateSourceAndPlace(sys->event, source, &place); EventThreadUpdateSourceAndPlace(sys->event, source, &place);
#if defined(MODULE_NAME_IS_wingapi)
if (place.width != fmt->i_width || place.height != fmt->i_height)
vout_display_SendEventPicturesInvalid(vd);
#endif
if (sys->hvideownd) if (sys->hvideownd)
SetWindowPos(sys->hvideownd, 0, SetWindowPos(sys->hvideownd, 0,
......
...@@ -187,39 +187,24 @@ struct vout_display_sys_t ...@@ -187,39 +187,24 @@ struct vout_display_sys_t
bool desktop_requested; bool desktop_requested;
#endif #endif
#ifdef MODULE_NAME_IS_wingdi #if defined(MODULE_NAME_IS_wingdi) || defined(MODULE_NAME_IS_wingapi)
int i_depth; int i_depth;
/* Our offscreen bitmap and its framebuffer */ /* Our offscreen bitmap and its framebuffer */
HDC off_dc; HDC off_dc;
HBITMAP off_bitmap; HBITMAP off_bitmap;
uint8_t * p_pic_buffer;
int i_pic_pitch;
int i_pic_pixel_pitch;
BITMAPINFO bitmapinfo;
RGBQUAD red;
RGBQUAD green;
RGBQUAD blue;
#endif
#ifdef MODULE_NAME_IS_wingapi picture_pool_t *pool;
int i_depth;
int render_width;
int render_height;
/* Our offscreen bitmap and its framebuffer */
HDC off_dc;
HBITMAP off_bitmap;
uint8_t * p_pic_buffer;
int i_pic_pitch;
int i_pic_pixel_pitch;
struct
{
BITMAPINFO bitmapinfo; BITMAPINFO bitmapinfo;
RGBQUAD red; RGBQUAD red;
RGBQUAD green; RGBQUAD green;
RGBQUAD blue; RGBQUAD blue;
};
# ifdef MODULE_NAME_IS_wingapi
HINSTANCE gapi_dll; /* handle of the opened gapi dll */ HINSTANCE gapi_dll; /* handle of the opened gapi dll */
/* GAPI functions */ /* GAPI functions */
...@@ -230,6 +215,7 @@ struct vout_display_sys_t ...@@ -230,6 +215,7 @@ struct vout_display_sys_t
GXDisplayProperties (*GXGetDisplayProperties)(); GXDisplayProperties (*GXGetDisplayProperties)();
int (*GXSuspend)(); int (*GXSuspend)();
int (*GXResume)(); int (*GXResume)();
# endif
#endif #endif
}; };
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment