[webkit-reviews] review granted: [Bug 170659] Drop Timer::startOneShot() overload taking a double : [Attachment 306661] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 10 00:34:37 PDT 2017
Yusuke Suzuki <utatane.tea at gmail.com> has granted Chris Dumez
<cdumez at apple.com>'s request for review:
Bug 170659: Drop Timer::startOneShot() overload taking a double
https://bugs.webkit.org/show_bug.cgi?id=170659
Attachment 306661: Patch
https://bugs.webkit.org/attachment.cgi?id=306661&action=review
--- Comment #9 from Yusuke Suzuki <utatane.tea at gmail.com> ---
Comment on attachment 306661
--> https://bugs.webkit.org/attachment.cgi?id=306661
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=306661&action=review
r=me with future clean up suggestion. Basically, I think `1_s * xxx` should be
removed in the future.
> Source/WebCore/page/EventSource.cpp:141
> + m_connectTimer.startOneShot(1_ms * m_reconnectDelay);
Nice.
> Source/WebCore/platform/ScrollAnimationSmooth.cpp:403
> + Seconds deltaToNextFrame = 1_s * ceil((currentTime -
m_startTime).value() * frameRate) / frameRate - (currentTime - m_startTime);
Looking the code, I think ceil, round, floor etc. overloading for Seconds would
be nice.
We already have several overloading functions, like, isnan, isinf, isfinite for
Seconds.
> Source/WebCore/platform/graphics/BitmapImage.cpp:342
> + m_desiredFrameStartTime = std::max(time, m_desiredFrameStartTime +
Seconds { frameDurationAtIndex(m_currentFrame) });
In a separate patch, we should return Seconds from frameDurationAtIndex.
> Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:774
> + d->m_timeoutSource.startOneShot(1_s *
d->m_firstRequest.timeoutInterval());
In a separate patch, we should change this timeoutInterval() to Seconds.
> Source/WebCore/replay/EventLoopInputDispatcher.cpp:121
> + m_timer.startOneShot(1_s * waitInterval);
In a separate patch, we should change this waitInterval (and related ones) to
Seconds.
> Source/WebKit/mac/Plugins/WebNetscapePluginView.mm:133
> + Seconds timeInterval = 1_ms * m_interval;
In a separate patch, we should change this m_interval to Seconds.
> Source/WebKit/mac/Storage/WebStorageManager.mm:118
> + (void)setStorageDatabaseIdleInterval:(double)interval
In a separate patch, we should change this interval to Seconds.
>
Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop
.cpp:155
> nextUpdateTime = std::max((1 / targetFPS) -
(monotonicallyIncreasingTime() - m_lastUpdateTime), 0.0);
In a separate patch, we should change this m_lastUpdateTime to MonotonicTime
and change nextUpdateTime to Seconds.
> Source/WebKit2/Shared/WebMemorySampler.cpp:91
> m_sampleTimer.startRepeating(1_s);
In a separate patch, we should chnage this initializeTimers's double to
Seconds.
More information about the webkit-reviews
mailing list