present: Move present_wnmd_screen_init to present_wnmd.c
Now all WNMD code is in present_wnmd.c. Acked-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
parent
b6d54b0f5d
commit
10bdd87fe4
|
@ -445,6 +445,11 @@ present_scmd_init_mode_hooks(present_screen_priv_ptr screen_priv);
|
||||||
/*
|
/*
|
||||||
* present_screen.c
|
* present_screen.c
|
||||||
*/
|
*/
|
||||||
|
Bool
|
||||||
|
present_screen_register_priv_keys(void);
|
||||||
|
|
||||||
|
present_screen_priv_ptr
|
||||||
|
present_screen_priv_init(ScreenPtr screen);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* present_vblank.c
|
* present_vblank.c
|
||||||
|
|
|
@ -155,7 +155,7 @@ present_clip_notify(WindowPtr window, int dx, int dy)
|
||||||
wrap(screen_priv, screen, ClipNotify, present_clip_notify);
|
wrap(screen_priv, screen, ClipNotify, present_clip_notify);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
Bool
|
||||||
present_screen_register_priv_keys(void)
|
present_screen_register_priv_keys(void)
|
||||||
{
|
{
|
||||||
if (!dixRegisterPrivateKey(&present_screen_private_key, PRIVATE_SCREEN, 0))
|
if (!dixRegisterPrivateKey(&present_screen_private_key, PRIVATE_SCREEN, 0))
|
||||||
|
@ -167,7 +167,7 @@ present_screen_register_priv_keys(void)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static present_screen_priv_ptr
|
present_screen_priv_ptr
|
||||||
present_screen_priv_init(ScreenPtr screen)
|
present_screen_priv_init(ScreenPtr screen)
|
||||||
{
|
{
|
||||||
present_screen_priv_ptr screen_priv;
|
present_screen_priv_ptr screen_priv;
|
||||||
|
@ -186,27 +186,6 @@ present_screen_priv_init(ScreenPtr screen)
|
||||||
return screen_priv;
|
return screen_priv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize a screen for use with present in window flip mode (wnmd)
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
present_wnmd_screen_init(ScreenPtr screen, present_wnmd_info_ptr info)
|
|
||||||
{
|
|
||||||
if (!present_screen_register_priv_keys())
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (!present_screen_priv(screen)) {
|
|
||||||
present_screen_priv_ptr screen_priv = present_screen_priv_init(screen);
|
|
||||||
if (!screen_priv)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
screen_priv->wnmd_info = info;
|
|
||||||
present_wnmd_init_mode_hooks(screen_priv);
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize a screen for use with present in default screen flip mode (scmd)
|
* Initialize a screen for use with present in default screen flip mode (scmd)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -725,3 +725,24 @@ present_wnmd_init_mode_hooks(present_screen_priv_ptr screen_priv)
|
||||||
|
|
||||||
screen_priv->abort_vblank = &present_wnmd_abort_vblank;
|
screen_priv->abort_vblank = &present_wnmd_abort_vblank;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize a screen for use with present in window flip mode (wnmd)
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
present_wnmd_screen_init(ScreenPtr screen, present_wnmd_info_ptr info)
|
||||||
|
{
|
||||||
|
if (!present_screen_register_priv_keys())
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (!present_screen_priv(screen)) {
|
||||||
|
present_screen_priv_ptr screen_priv = present_screen_priv_init(screen);
|
||||||
|
if (!screen_priv)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
screen_priv->wnmd_info = info;
|
||||||
|
present_wnmd_init_mode_hooks(screen_priv);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user