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

Ivan Kalvachev ivan at cacad.com
Wed Jun 23 20:23:11 CEST 2004


Joey Parrish said:
> On Tue, Jun 22, 2004 at 10:42:09AM +0200, Diego Biurrun wrote:
>> Reimar Döffinger writes:
>> > > 01:44 <@KotH> DonDiego: whether it catches all XFlush calls 01:44
<@KotH> DonDiego: if he is right, then there should be no XFlush
>> in the x11 code
>> >
>> > My theory was always that the XFlush is rather useless. Am I correct?
Should they be removed as well? (The problem described in the original
mail can't happen here, as XSync is called as well).
>> Been talking to Attila on IRC again:
>> 02:50 <@KotH> DonDiego: imho, the patch should be extended to
>>               xv/x11/x11_common, then it's ok to apply
>> 02:51 <@KotH> DonDiego: and to answer reimars question: according to the
>>               manpages, doing xflush+xsync is useless, xsync alone is
enough
>> So could somebody extend this patch?
>
> Okay, the first patch removes XFlush whenever it's redundant with XSync
calls.  The second patch removes all XFlush everywhere.  I know little of X,
but I feel like the first one is probably safe and the second one is
probably wrong.  I leave it to somebody else to apply.
>
> Patches actually attached this time.  :)
>
> --Joey

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?

Wish You Best
   Ivan Kalvachev
  iive







More information about the MPlayer-dev-eng mailing list