<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] RequestAnimationFrame ticks at 66 FPS instead of 60 FPS"
href="https://bugs.webkit.org/show_bug.cgi?id=166057#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] RequestAnimationFrame ticks at 66 FPS instead of 60 FPS"
href="https://bugs.webkit.org/show_bug.cgi?id=166057">bug 166057</a>
from <span class="vcard"><a class="email" href="mailto:clopez@igalia.com" title="Carlos Alberto Lopez Perez <clopez@igalia.com>"> <span class="fn">Carlos Alberto Lopez Perez</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=166057#c4">comment #4</a>)
<span class="quote">> (In reply to <a href="show_bug.cgi?id=166057#c3">comment #3</a>)
> > (In reply to <a href="show_bug.cgi?id=166057#c2">comment #2</a>)
> > > I looked into using DisplayRefreshMonitor for the GTK port, specifically in
> > > the ThreadedCompositor. The problem is that when using GLX, there's no
> > > facility available that could send a notification about the vsync event from
> > > the UIProcess down to the WebProcess. With Wayland there's frame callbacks.
> >
> > Some people suggest to use a separate thread doing glXSwapBuffers();
> > glFinish(); all the time after setting glXSwapIntervalEXT(1) (which should
> > cause the glXSwapBuffers call to be synced with vsync) and then notify the
> > main thread about the vsync events.
> >
> > But I doubt this will be a good idea from a performance-related point of
> > view.
>
> I don't know the specifics of those suggestions, but it's maybe similar to
> what we do with the threaded compositor? GL operations are done on a
> separate thread, and this DisplayRefreshMonitor would be dispatching the
> event on the main thread so that it can be signalled to the Web content as
> well.</span >
I got that info from this thread: <a href="http://stackoverflow.com/q/36888288">http://stackoverflow.com/q/36888288</a>
In our use case (with the threaded compositor) I think that we don't call glXSwapBuffers() all the time, but only when we have new content to show.
But a DisplayRefreshMonitor should send an event notification every time a vsync happens on the monitor (even if we don't have nothing new to show on the screen).
So, perhaps a way to achieve that in X11 is a dummy thread doing all the time dummy glXSwapBuffers();glFinish(); calls, with the hope that this calls will be throttled to the display refresh rate.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>