[MPlayer-dev-eng] [PATCH][RESEND] XV page flipping sync

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Aug 1 18:07:26 CEST 2004


Hi,
> Somehow I don't like both patches.
> I agree it is pointless to have BOTH XFlush and XSync, but I'm not sure that
> XFlush is always the one that should be removed.
> 
> I particularry don't like this:
> @@ -595,12 +593,9 @@
>                     (vo_fs ? vo_dheight - 1 : vo_dheight) + vo_panscan_y);
>      }
>      if (num_buffers > 1)
> -    {
>          current_buf =
>              vo_directrendering ? 0 : ((current_buf + 1) % num_buffers);
> -        XFlush(mDisplay);
> -    } else
> -        XSync(mDisplay, False);
> +    XSync(mDisplay, False);
>      return;
>  }
> Are you sure this is the right solution for all cases?
> Anyway are you sure that this syntax doesn't have some purpose?

I'm quite sure the idea was that when using multiple buffers we won't 
overwrite it when drawing the next frame, so if it is drawn a bit later 
(i.e. some milliseconds after XFlush) it doesn't matter.
But this is not true, as
1) The picture should be actually _drawn before_ returning from flip_page
2) I the X server has a low priority it might simply never get to draw 
anything, even with XFlush.

So I think that XSync is the only correct thing here, although I have to 
admit I don't really know X.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list