<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Use a RunLoop::Timer to schedule rendering frames in accelerated compositing mode"
href="https://bugs.webkit.org/show_bug.cgi?id=150756#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Use a RunLoop::Timer to schedule rendering frames in accelerated compositing mode"
href="https://bugs.webkit.org/show_bug.cgi?id=150756">bug 150756</a>
from <span class="vcard"><a class="email" href="mailto:cgarcia@igalia.com" title="Carlos Garcia Campos <cgarcia@igalia.com>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=150756#c3">comment #3</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=264472&action=diff" name="attach_264472" title="Patch">attachment 264472</a> <a href="attachment.cgi?id=264472&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=264472&action=review">https://bugs.webkit.org/attachment.cgi?id=264472&action=review</a>
>
> > Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:69
> > + // We use a GLib timer because otherwise GTK+ event handling during dragging can starve WebCore timers, which have a lower priority.
> > + // Use a higher priority than WebCore timers.
>
> I don’t understand what “we use a GLib timer” means here, since we are using
> a RunLoop timer. Should be clearer on that.</span >
Yes, the fact that the run loop timer implementation uses a glib timer is an implementation detail. I'll reword that.
<span class="quote">> > Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:107
> > + static const double targetFramerate = 1 / 60.0;
> > + // When rendering layers takes more time than the target delay (0.016), we end up scheduling layer flushes
> > + // immediately. Since the layer flush timer has a higher priority than WebCore timers, these are never
> > + // fired while we keep scheduling layer flushes immediately.
> > + double current = monotonicallyIncreasingTime();
> > + double timeToNextFlush = std::max(targetFramerate - (current - m_fireTime), 0.0);
>
> We prefer use of std::chrono in new code, rather than the "double in
> seconds" style we wrote in older code. Would be good to return here and move
> to that.</span >
Ok, I'll do it in a different patch</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>