mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 08:10:03 +01:00
Merge branch 'present-bump-version-to-1.3' into 'master'
present: Check PresentOptionAsyncMayTear against capabilities See merge request xorg/xserver!1183
This commit is contained in:
commit
6a726e4a37
1 changed files with 9 additions and 0 deletions
|
|
@ -246,6 +246,15 @@ present_pixmap(WindowPtr window,
|
||||||
{
|
{
|
||||||
ScreenPtr screen = window->drawable.pScreen;
|
ScreenPtr screen = window->drawable.pScreen;
|
||||||
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
|
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
|
||||||
|
uint32_t capabilities;
|
||||||
|
|
||||||
|
/* Make sure the option PresentOptionAsyncMayTear, if passed by the client,
|
||||||
|
* is actually supported.
|
||||||
|
*/
|
||||||
|
capabilities = screen_priv->query_capabilities(screen_priv);
|
||||||
|
if ((options & PresentOptionAsyncMayTear) &&
|
||||||
|
!(capabilities & PresentCapabilityAsyncMayTear))
|
||||||
|
return BadValue;
|
||||||
|
|
||||||
return screen_priv->present_pixmap(window,
|
return screen_priv->present_pixmap(window,
|
||||||
pixmap,
|
pixmap,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue