[webkit-reviews] review granted: [Bug 188645] [GStreamer] reduce position queries frequency : [Attachment 347261] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 17 02:47:02 PDT 2018
Xabier RodrÃguez Calvar <calvaris at igalia.com> has granted Philippe Normand
<pnormand at igalia.com>'s request for review:
Bug 188645: [GStreamer] reduce position queries frequency
https://bugs.webkit.org/show_bug.cgi?id=188645
Attachment 347261: Patch
https://bugs.webkit.org/attachment.cgi?id=347261&action=review
--- Comment #4 from Xabier RodrÃguez Calvar <calvaris at igalia.com> ---
Comment on attachment 347261
--> https://bugs.webkit.org/attachment.cgi?id=347261
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=347261&action=review
>
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:351
> + double now = WTF::WallTime::now().secondsSinceEpoch().milliseconds();
> + if (m_lastQuery > -1 && ((now - m_lastQuery) < 300) &&
m_cachedPosition.isValid())
> + return m_cachedPosition;
> +
> + m_lastQuery = now;
My preference here, to save one variable and one call, would be:
(if m_cachedPosition.isValid()) {
double now = ...
if (m_last...
More information about the webkit-reviews
mailing list