| Differences between
and this patch
- a/Source/WTF/ChangeLog +8 lines
Lines 1-3 a/Source/WTF/ChangeLog_sec1
1
2013-08-17  Arunprasad Rajkumar  <arurajku@cisco.com>
2
3
        <https://webkit.org/b/119958> CONTINUATION(r154201): Replace currentTime() with monotonicallyIncreasingTime() in WebCore
4
5
        Reviewed by NOBODY (OOPS!).
6
7
        * wtf/CurrentTime.h: Edited comment.
8
1
2013-08-16  Arunprasad Rajkumar  <arurajku@cisco.com>
9
2013-08-16  Arunprasad Rajkumar  <arurajku@cisco.com>
2
10
3
        <https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
11
        <https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
- a/Source/WebCore/ChangeLog +83 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2013-08-17  Arunprasad Rajkumar  <arurajku@cisco.com>
2
3
        <https://webkit.org/b/119958> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
4
5
        Reviewed by NOBODY (OOPS!).
6
7
        WTF::currentTime() is prone to NTP and manual adjustments, so use
8
        WTF::monotonicallyIncreasingTime() to measure elapsed time.
9
10
        * history/CachedPage.cpp:
11
        (WebCore::CachedPage::CachedPage):
12
        (WebCore::CachedPage::hasExpired):
13
        * html/parser/HTMLParserScheduler.h:
14
        (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
15
        * loader/CrossOriginPreflightResultCache.cpp:
16
        (WebCore::CrossOriginPreflightResultCacheItem::parse):
17
        (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest):
18
        * loader/FrameLoader.cpp:
19
        (WebCore::FrameLoader::setState):
20
        * loader/ProgressTracker.cpp:
21
        (WebCore::ProgressTracker::incrementProgress):
22
        * loader/cache/CachedCSSStyleSheet.cpp:
23
        (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
24
        * loader/cache/CachedImage.cpp:
25
        (WebCore::CachedImage::didDraw):
26
        * loader/cache/MemoryCache.cpp:
27
        (WebCore::MemoryCache::pruneLiveResourcesToSize):
28
        * loader/icon/IconDatabase.cpp:
29
        (WebCore::IconDatabase::iconDatabaseSyncThread):
30
        (WebCore::IconDatabase::syncThreadMainLoop):
31
        (WebCore::IconDatabase::readFromDatabase):
32
        (WebCore::IconDatabase::writeToDatabase):
33
        (WebCore::IconDatabase::cleanupSyncThread):
34
        * page/animation/AnimationBase.cpp:
35
        (WebCore::AnimationBase::freezeAtTime):
36
        * page/animation/AnimationController.cpp:
37
        (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
38
        * platform/graphics/GraphicsLayerAnimation.cpp:
39
        (WebCore::GraphicsLayerAnimation::computeTotalRunningTime):
40
        (WebCore::GraphicsLayerAnimation::resume):
41
        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
42
        (WebCore::AVFWrapper::createImageForTimeInRect):
43
        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
44
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
45
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):
46
        * platform/graphics/ca/GraphicsLayerCA.cpp:
47
        (WebCore::GraphicsLayerCA::suspendAnimations):
48
        * platform/graphics/ca/PlatformCALayer.h:
49
        (WebCore::PlatformCALayer::currentTimeToMediaTime):
50
        * platform/graphics/ca/mac/LayerPool.mm:
51
        (WebCore::LayerPool::addLayer):
52
        (WebCore::LayerPool::decayedCapacity):
53
        (WebCore::LayerPool::pruneTimerFired):
54
        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
55
        (mediaTimeToCurrentTime):
56
        * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
57
        (WebCore::CACFLayerTreeHost::notifyAnimationsStarted):
58
        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
59
        (PlatformCALayer::printTree):
60
        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
61
        (WebCore::GraphicsLayerTextureMapper::addAnimation):
62
        * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
63
        (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
64
        (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
65
        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
66
        (WebCore::CoordinatedGraphicsLayer::addAnimation):
67
        * platform/network/DNSResolveQueue.cpp:
68
        (WebCore::DNSResolveQueue::isUsingProxy):
69
        * plugins/win/PluginMessageThrottlerWin.cpp:
70
        (WebCore::PluginMessageThrottlerWin::appendMessage):
71
        * rendering/RenderLayerCompositor.cpp:
72
        (WebCore::RenderLayerCompositor::didPaintBacking):
73
        (WebCore::RenderLayerCompositor::updateCompositingLayers):
74
        * rendering/RenderProgress.cpp:
75
        (WebCore::RenderProgress::animationProgress):
76
        (WebCore::RenderProgress::updateAnimationState):
77
        * svg/animation/SMILTimeContainer.cpp:
78
        (WebCore::SMILTimeContainer::elapsed):
79
        (WebCore::SMILTimeContainer::begin):
80
        (WebCore::SMILTimeContainer::pause):
81
        (WebCore::SMILTimeContainer::resume):
82
        (WebCore::SMILTimeContainer::setElapsed):
83
1
2013-08-16  Ryosuke Niwa  <rniwa@webkit.org>
84
2013-08-16  Ryosuke Niwa  <rniwa@webkit.org>
2
85
3
        <https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable
86
        <https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable
- a/Source/WTF/wtf/CurrentTime.h -1 / +1 lines
Lines 52-58 inline double currentTimeMS() a/Source/WTF/wtf/CurrentTime.h_sec1
52
// Provides a monotonically increasing time in seconds since an arbitrary point in the past.
52
// Provides a monotonically increasing time in seconds since an arbitrary point in the past.
53
// On unsupported platforms, this function only guarantees the result will be non-decreasing.
53
// On unsupported platforms, this function only guarantees the result will be non-decreasing.
54
// Result of this function increases monotonically even when clock time goes back due to
54
// Result of this function increases monotonically even when clock time goes back due to
55
// DST changes or NTP adjustments, so it better suits for elapsed time measurement.
55
// NTP or manual adjustments , so it is better suited for elapsed time measurement.
56
WTF_EXPORT_PRIVATE double monotonicallyIncreasingTime();
56
WTF_EXPORT_PRIVATE double monotonicallyIncreasingTime();
57
57
58
inline double monotonicallyIncreasingTimeMS()
58
inline double monotonicallyIncreasingTimeMS()
- a/Source/WebCore/history/CachedPage.cpp -2 / +2 lines
Lines 51-57 PassRefPtr<CachedPage> CachedPage::create(Page* page) a/Source/WebCore/history/CachedPage.cpp_sec1
51
}
51
}
52
52
53
CachedPage::CachedPage(Page* page)
53
CachedPage::CachedPage(Page* page)
54
    : m_timeStamp(currentTime())
54
    : m_timeStamp(monotonicallyIncreasingTime())
55
    , m_expirationTime(m_timeStamp + page->settings().backForwardCacheExpirationInterval())
55
    , m_expirationTime(m_timeStamp + page->settings().backForwardCacheExpirationInterval())
56
    , m_cachedMainFrame(CachedFrame::create(page->mainFrame()))
56
    , m_cachedMainFrame(CachedFrame::create(page->mainFrame()))
57
    , m_needStyleRecalcForVisitedLinks(false)
57
    , m_needStyleRecalcForVisitedLinks(false)
Lines 130-136 void CachedPage::destroy() a/Source/WebCore/history/CachedPage.cpp_sec2
130
130
131
bool CachedPage::hasExpired() const
131
bool CachedPage::hasExpired() const
132
{
132
{
133
    return currentTime() > m_expirationTime;
133
    return monotonicallyIncreasingTime() > m_expirationTime;
134
}
134
}
135
135
136
} // namespace WebCore
136
} // namespace WebCore
- a/Source/WebCore/html/parser/HTMLParserScheduler.h -2 / +2 lines
Lines 70-77 public: a/Source/WebCore/html/parser/HTMLParserScheduler.h_sec1
70
    void checkForYieldBeforeToken(PumpSession& session)
70
    void checkForYieldBeforeToken(PumpSession& session)
71
    {
71
    {
72
        if (session.processedTokens > m_parserChunkSize || session.didSeeScript) {
72
        if (session.processedTokens > m_parserChunkSize || session.didSeeScript) {
73
            // currentTime() can be expensive.  By delaying, we avoided calling
73
            // monotonicallyIncreasingTime() can be expensive. By delaying, we avoided calling
74
            // currentTime() when constructing non-yielding PumpSessions.
74
            // monotonicallyIncreasingTime() when constructing non-yielding PumpSessions.
75
            if (!session.startTime)
75
            if (!session.startTime)
76
                session.startTime = monotonicallyIncreasingTime();
76
                session.startTime = monotonicallyIncreasingTime();
77
77
- a/Source/WebCore/loader/CrossOriginPreflightResultCache.cpp -2 / +2 lines
Lines 108-114 bool CrossOriginPreflightResultCacheItem::parse(const ResourceResponse& response a/Source/WebCore/loader/CrossOriginPreflightResultCache.cpp_sec1
108
    } else
108
    } else
109
        expiryDelta = defaultPreflightCacheTimeoutSeconds;
109
        expiryDelta = defaultPreflightCacheTimeoutSeconds;
110
110
111
    m_absoluteExpiryTime = currentTime() + expiryDelta;
111
    m_absoluteExpiryTime = monotonicallyIncreasingTime() + expiryDelta;
112
    return true;
112
    return true;
113
}
113
}
114
114
Lines 136-142 bool CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders(const HTTPHea a/Source/WebCore/loader/CrossOriginPreflightResultCache.cpp_sec2
136
bool CrossOriginPreflightResultCacheItem::allowsRequest(StoredCredentials includeCredentials, const String& method, const HTTPHeaderMap& requestHeaders) const
136
bool CrossOriginPreflightResultCacheItem::allowsRequest(StoredCredentials includeCredentials, const String& method, const HTTPHeaderMap& requestHeaders) const
137
{
137
{
138
    String ignoredExplanation;
138
    String ignoredExplanation;
139
    if (m_absoluteExpiryTime < currentTime())
139
    if (m_absoluteExpiryTime < monotonicallyIncreasingTime())
140
        return false;
140
        return false;
141
    if (includeCredentials == AllowStoredCredentials && m_credentials == DoNotAllowStoredCredentials)
141
    if (includeCredentials == AllowStoredCredentials && m_credentials == DoNotAllowStoredCredentials)
142
        return false;
142
        return false;
- a/Source/WebCore/loader/FrameLoader.cpp -1 / +1 lines
Lines 1685-1691 void FrameLoader::setState(FrameState newState) a/Source/WebCore/loader/FrameLoader.cpp_sec1
1685
        provisionalLoadStarted();
1685
        provisionalLoadStarted();
1686
    else if (newState == FrameStateComplete) {
1686
    else if (newState == FrameStateComplete) {
1687
        frameLoadCompleted();
1687
        frameLoadCompleted();
1688
        storedTimeOfLastCompletedLoad = currentTime();
1688
        storedTimeOfLastCompletedLoad = monotonicallyIncreasingTime();
1689
        if (m_documentLoader)
1689
        if (m_documentLoader)
1690
            m_documentLoader->stopRecordingResponses();
1690
            m_documentLoader->stopRecordingResponses();
1691
    }
1691
    }
- a/Source/WebCore/loader/ProgressTracker.cpp -1 / +1 lines
Lines 241-247 void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i a/Source/WebCore/loader/ProgressTracker.cpp_sec1
241
    
241
    
242
    m_totalBytesReceived += bytesReceived;
242
    m_totalBytesReceived += bytesReceived;
243
    
243
    
244
    double now = currentTime();
244
    double now = monotonicallyIncreasingTime();
245
    double notifiedProgressTimeDelta = now - m_lastNotifiedProgressTime;
245
    double notifiedProgressTimeDelta = now - m_lastNotifiedProgressTime;
246
    
246
    
247
    LOG(Progress, "Progress incremented (%p) - value %f, tracked frames %d", this, m_progressValue, m_numProgressTrackedFrames);
247
    LOG(Progress, "Progress incremented (%p) - value %f, tracked frames %d", this, m_progressValue, m_numProgressTrackedFrames);
- a/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp -1 / +1 lines
Lines 173-179 PassRefPtr<StyleSheetContents> CachedCSSStyleSheet::restoreParsedStyleSheet(cons a/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp_sec1
173
    if (m_parsedStyleSheetCache->parserContext() != context)
173
    if (m_parsedStyleSheetCache->parserContext() != context)
174
        return 0;
174
        return 0;
175
175
176
    didAccessDecodedData(currentTime());
176
    didAccessDecodedData(monotonicallyIncreasingTime());
177
177
178
    return m_parsedStyleSheetCache;
178
    return m_parsedStyleSheetCache;
179
}
179
}
- a/Source/WebCore/loader/cache/CachedImage.cpp -1 / +1 lines
Lines 472-478 void CachedImage::didDraw(const Image* image) a/Source/WebCore/loader/cache/CachedImage.cpp_sec1
472
    
472
    
473
    double timeStamp = FrameView::currentPaintTimeStamp();
473
    double timeStamp = FrameView::currentPaintTimeStamp();
474
    if (!timeStamp) // If didDraw is called outside of a Frame paint.
474
    if (!timeStamp) // If didDraw is called outside of a Frame paint.
475
        timeStamp = currentTime();
475
        timeStamp = monotonicallyIncreasingTime();
476
    
476
    
477
    CachedResource::didAccessDecodedData(timeStamp);
477
    CachedResource::didAccessDecodedData(timeStamp);
478
}
478
}
- a/Source/WebCore/loader/cache/MemoryCache.cpp -1 / +1 lines
Lines 243-249 void MemoryCache::pruneLiveResourcesToSize(unsigned targetSize) a/Source/WebCore/loader/cache/MemoryCache.cpp_sec1
243
243
244
    double currentTime = FrameView::currentPaintTimeStamp();
244
    double currentTime = FrameView::currentPaintTimeStamp();
245
    if (!currentTime) // In case prune is called directly, outside of a Frame paint.
245
    if (!currentTime) // In case prune is called directly, outside of a Frame paint.
246
        currentTime = WTF::currentTime();
246
        currentTime = monotonicallyIncreasingTime();
247
    
247
    
248
    // Destroy any decoded data in live objects that we can.
248
    // Destroy any decoded data in live objects that we can.
249
    // Start from the tail, since this is the least recently accessed of the objects.
249
    // Start from the tail, since this is the least recently accessed of the objects.
- a/Source/WebCore/loader/icon/IconDatabase.cpp -15 / +15 lines
Lines 989-995 void IconDatabase::iconDatabaseSyncThread() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec1
989
    LOG(IconDatabase, "(THREAD) IconDatabase sync thread started");
989
    LOG(IconDatabase, "(THREAD) IconDatabase sync thread started");
990
990
991
#if !LOG_DISABLED
991
#if !LOG_DISABLED
992
    double startTime = currentTime();
992
    double startTime = monotonicallyIncreasingTime();
993
#endif
993
#endif
994
994
995
    // Need to create the database path if it doesn't already exist
995
    // Need to create the database path if it doesn't already exist
Lines 1017-1023 void IconDatabase::iconDatabaseSyncThread() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec2
1017
    }
1017
    }
1018
        
1018
        
1019
#if !LOG_DISABLED
1019
#if !LOG_DISABLED
1020
    double timeStamp = currentTime();
1020
    double timeStamp = monotonicallyIncreasingTime();
1021
    LOG(IconDatabase, "(THREAD) Open took %.4f seconds", timeStamp - startTime);
1021
    LOG(IconDatabase, "(THREAD) Open took %.4f seconds", timeStamp - startTime);
1022
#endif    
1022
#endif    
1023
1023
Lines 1028-1040 void IconDatabase::iconDatabaseSyncThread() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec3
1028
    }
1028
    }
1029
        
1029
        
1030
#if !LOG_DISABLED
1030
#if !LOG_DISABLED
1031
    double newStamp = currentTime();
1031
    double newStamp = monotonicallyIncreasingTime();
1032
    LOG(IconDatabase, "(THREAD) performOpenInitialization() took %.4f seconds, now %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime);
1032
    LOG(IconDatabase, "(THREAD) performOpenInitialization() took %.4f seconds, now %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime);
1033
    timeStamp = newStamp;
1033
    timeStamp = newStamp;
1034
#endif 
1034
#endif 
1035
        
1035
        
1036
    // Uncomment the following line to simulate a long lasting URL import (*HUGE* icon databases, or network home directories)
1036
    // Uncomment the following line to simulate a long lasting URL import (*HUGE* icon databases, or network home directories)
1037
    // while (currentTime() - timeStamp < 10);
1037
    // while (monotonicallyIncreasingTime() - timeStamp < 10);
1038
1038
1039
    // Read in URL mappings from the database          
1039
    // Read in URL mappings from the database          
1040
    LOG(IconDatabase, "(THREAD) Starting iconURL import");
1040
    LOG(IconDatabase, "(THREAD) Starting iconURL import");
Lines 1046-1052 void IconDatabase::iconDatabaseSyncThread() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec4
1046
    }
1046
    }
1047
1047
1048
#if !LOG_DISABLED
1048
#if !LOG_DISABLED
1049
    newStamp = currentTime();
1049
    newStamp = monotonicallyIncreasingTime();
1050
    LOG(IconDatabase, "(THREAD) performURLImport() took %.4f seconds.  Entering main loop %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime);
1050
    LOG(IconDatabase, "(THREAD) performURLImport() took %.4f seconds.  Entering main loop %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime);
1051
#endif 
1051
#endif 
1052
1052
Lines 1374-1380 void IconDatabase::syncThreadMainLoop() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec5
1374
        m_syncLock.unlock();
1374
        m_syncLock.unlock();
1375
1375
1376
#if !LOG_DISABLED
1376
#if !LOG_DISABLED
1377
        double timeStamp = currentTime();
1377
        double timeStamp = monotonicallyIncreasingTime();
1378
#endif
1378
#endif
1379
        LOG(IconDatabase, "(THREAD) Main work loop starting");
1379
        LOG(IconDatabase, "(THREAD) Main work loop starting");
1380
1380
Lines 1412-1424 void IconDatabase::syncThreadMainLoop() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec6
1412
            static bool prunedUnretainedIcons = false;
1412
            static bool prunedUnretainedIcons = false;
1413
            if (didWrite && !m_privateBrowsingEnabled && !prunedUnretainedIcons && !databaseCleanupCounter) {
1413
            if (didWrite && !m_privateBrowsingEnabled && !prunedUnretainedIcons && !databaseCleanupCounter) {
1414
#if !LOG_DISABLED
1414
#if !LOG_DISABLED
1415
                double time = currentTime();
1415
                double time = monotonicallyIncreasingTime();
1416
#endif
1416
#endif
1417
                LOG(IconDatabase, "(THREAD) Starting pruneUnretainedIcons()");
1417
                LOG(IconDatabase, "(THREAD) Starting pruneUnretainedIcons()");
1418
                
1418
                
1419
                pruneUnretainedIcons();
1419
                pruneUnretainedIcons();
1420
                
1420
                
1421
                LOG(IconDatabase, "(THREAD) pruneUnretainedIcons() took %.4f seconds", currentTime() - time);
1421
                LOG(IconDatabase, "(THREAD) pruneUnretainedIcons() took %.4f seconds", monotonicallyIncreasingTime() - time);
1422
                
1422
                
1423
                // If pruneUnretainedIcons() returned early due to requested thread termination, its still okay
1423
                // If pruneUnretainedIcons() returned early due to requested thread termination, its still okay
1424
                // to mark prunedUnretainedIcons true because we're about to terminate anyway
1424
                // to mark prunedUnretainedIcons true because we're about to terminate anyway
Lines 1431-1437 void IconDatabase::syncThreadMainLoop() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec7
1431
        }
1431
        }
1432
        
1432
        
1433
#if !LOG_DISABLED
1433
#if !LOG_DISABLED
1434
        double newstamp = currentTime();
1434
        double newstamp = monotonicallyIncreasingTime();
1435
        LOG(IconDatabase, "(THREAD) Main work loop ran for %.4f seconds, %s requested to terminate", newstamp - timeStamp, shouldStopThreadActivity() ? "was" : "was not");
1435
        LOG(IconDatabase, "(THREAD) Main work loop ran for %.4f seconds, %s requested to terminate", newstamp - timeStamp, shouldStopThreadActivity() ? "was" : "was not");
1436
#endif
1436
#endif
1437
                    
1437
                    
Lines 1513-1519 bool IconDatabase::readFromDatabase() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec8
1513
    ASSERT_ICON_SYNC_THREAD();
1513
    ASSERT_ICON_SYNC_THREAD();
1514
    
1514
    
1515
#if !LOG_DISABLED
1515
#if !LOG_DISABLED
1516
    double timeStamp = currentTime();
1516
    double timeStamp = monotonicallyIncreasingTime();
1517
#endif
1517
#endif
1518
1518
1519
    bool didAnyWork = false;
1519
    bool didAnyWork = false;
Lines 1607-1613 bool IconDatabase::readFromDatabase() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec9
1607
            return didAnyWork;
1607
            return didAnyWork;
1608
    }
1608
    }
1609
1609
1610
    LOG(IconDatabase, "Reading from database took %.4f seconds", currentTime() - timeStamp);
1610
    LOG(IconDatabase, "Reading from database took %.4f seconds", monotonicallyIncreasingTime() - timeStamp);
1611
1611
1612
    return didAnyWork;
1612
    return didAnyWork;
1613
}
1613
}
Lines 1617-1623 bool IconDatabase::writeToDatabase() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec10
1617
    ASSERT_ICON_SYNC_THREAD();
1617
    ASSERT_ICON_SYNC_THREAD();
1618
1618
1619
#if !LOG_DISABLED
1619
#if !LOG_DISABLED
1620
    double timeStamp = currentTime();
1620
    double timeStamp = monotonicallyIncreasingTime();
1621
#endif
1621
#endif
1622
1622
1623
    bool didAnyWork = false;
1623
    bool didAnyWork = false;
Lines 1667-1673 bool IconDatabase::writeToDatabase() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec11
1667
    if (didAnyWork)
1667
    if (didAnyWork)
1668
        checkForDanglingPageURLs(false);
1668
        checkForDanglingPageURLs(false);
1669
1669
1670
    LOG(IconDatabase, "Updating the database took %.4f seconds", currentTime() - timeStamp);
1670
    LOG(IconDatabase, "Updating the database took %.4f seconds", monotonicallyIncreasingTime() - timeStamp);
1671
1671
1672
    return didAnyWork;
1672
    return didAnyWork;
1673
}
1673
}
Lines 1822-1828 void* IconDatabase::cleanupSyncThread() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec12
1822
    ASSERT_ICON_SYNC_THREAD();
1822
    ASSERT_ICON_SYNC_THREAD();
1823
    
1823
    
1824
#if !LOG_DISABLED
1824
#if !LOG_DISABLED
1825
    double timeStamp = currentTime();
1825
    double timeStamp = monotonicallyIncreasingTime();
1826
#endif 
1826
#endif 
1827
1827
1828
    // If the removeIcons flag is set, remove all icons from the db.
1828
    // If the removeIcons flag is set, remove all icons from the db.
Lines 1842-1848 void* IconDatabase::cleanupSyncThread() a/Source/WebCore/loader/icon/IconDatabase.cpp_sec13
1842
    m_syncDB.close();
1842
    m_syncDB.close();
1843
    
1843
    
1844
#if !LOG_DISABLED
1844
#if !LOG_DISABLED
1845
    LOG(IconDatabase, "(THREAD) Final closure took %.4f seconds", currentTime() - timeStamp);
1845
    LOG(IconDatabase, "(THREAD) Final closure took %.4f seconds", monotonicallyIncreasingTime() - timeStamp);
1846
#endif
1846
#endif
1847
    
1847
    
1848
    m_syncThreadRunning = false;
1848
    m_syncThreadRunning = false;
- a/Source/WebCore/page/animation/AnimationBase.cpp -1 / +1 lines
Lines 650-656 void AnimationBase::freezeAtTime(double t) a/Source/WebCore/page/animation/AnimationBase.cpp_sec1
650
        // If we haven't started yet, make it as if we started.
650
        // If we haven't started yet, make it as if we started.
651
        LOG(Animations, "%p AnimationState %s -> StartWaitResponse", this, nameForState(m_animState));
651
        LOG(Animations, "%p AnimationState %s -> StartWaitResponse", this, nameForState(m_animState));
652
        m_animState = AnimationStateStartWaitResponse;
652
        m_animState = AnimationStateStartWaitResponse;
653
        onAnimationStartResponse(currentTime());
653
        onAnimationStartResponse(monotonicallyIncreasingTime());
654
    }
654
    }
655
655
656
    ASSERT(m_startTime);        // if m_startTime is zero, we haven't started yet, so we'll get a bad pause time.
656
    ASSERT(m_startTime);        // if m_startTime is zero, we haven't started yet, so we'll get a bad pause time.
- a/Source/WebCore/page/animation/AnimationController.cpp -1 / +1 lines
Lines 365-371 bool AnimationControllerPrivate::pauseTransitionAtTime(RenderObject* renderer, c a/Source/WebCore/page/animation/AnimationController.cpp_sec1
365
double AnimationControllerPrivate::beginAnimationUpdateTime()
365
double AnimationControllerPrivate::beginAnimationUpdateTime()
366
{
366
{
367
    if (m_beginAnimationUpdateTime == cBeginAnimationUpdateTimeNotSet)
367
    if (m_beginAnimationUpdateTime == cBeginAnimationUpdateTimeNotSet)
368
        m_beginAnimationUpdateTime = currentTime();
368
        m_beginAnimationUpdateTime = monotonicallyIncreasingTime();
369
    return m_beginAnimationUpdateTime;
369
    return m_beginAnimationUpdateTime;
370
}
370
}
371
371
- a/Source/WebCore/platform/graphics/GraphicsLayerAnimation.cpp -2 / +2 lines
Lines 323-329 double GraphicsLayerAnimation::computeTotalRunningTime() a/Source/WebCore/platform/graphics/GraphicsLayerAnimation.cpp_sec1
323
        return m_pauseTime;
323
        return m_pauseTime;
324
324
325
    double oldLastRefreshedTime = m_lastRefreshedTime;
325
    double oldLastRefreshedTime = m_lastRefreshedTime;
326
    m_lastRefreshedTime = WTF::currentTime();
326
    m_lastRefreshedTime = monotonicallyIncreasingTime();
327
    m_totalRunningTime += m_lastRefreshedTime - oldLastRefreshedTime;
327
    m_totalRunningTime += m_lastRefreshedTime - oldLastRefreshedTime;
328
    return m_totalRunningTime;
328
    return m_totalRunningTime;
329
}
329
}
Lines 338-344 void GraphicsLayerAnimation::resume() a/Source/WebCore/platform/graphics/GraphicsLayerAnimation.cpp_sec2
338
{
338
{
339
    setState(PlayingState);
339
    setState(PlayingState);
340
    m_totalRunningTime = m_pauseTime;
340
    m_totalRunningTime = m_pauseTime;
341
    m_lastRefreshedTime = WTF::currentTime();
341
    m_lastRefreshedTime = monotonicallyIncreasingTime();
342
}
342
}
343
343
344
void GraphicsLayerAnimations::add(const GraphicsLayerAnimation& animation)
344
void GraphicsLayerAnimations::add(const GraphicsLayerAnimation& animation)
- a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp -2 / +2 lines
Lines 1622-1635 RetainPtr<CGImageRef> AVFWrapper::createImageForTimeInRect(float time, const Int a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp_sec1
1622
        return 0;
1622
        return 0;
1623
1623
1624
#if !LOG_DISABLED
1624
#if !LOG_DISABLED
1625
    double start = WTF::currentTime();
1625
    double start = monotonicallyIncreasingTime();
1626
#endif
1626
#endif
1627
1627
1628
    AVCFAssetImageGeneratorSetMaximumSize(m_imageGenerator.get(), CGSize(rect.size()));
1628
    AVCFAssetImageGeneratorSetMaximumSize(m_imageGenerator.get(), CGSize(rect.size()));
1629
    CGImageRef image = AVCFAssetImageGeneratorCopyCGImageAtTime(m_imageGenerator.get(), CMTimeMakeWithSeconds(time, 600), 0, 0);
1629
    CGImageRef image = AVCFAssetImageGeneratorCopyCGImageAtTime(m_imageGenerator.get(), CMTimeMakeWithSeconds(time, 600), 0, 0);
1630
1630
1631
#if !LOG_DISABLED
1631
#if !LOG_DISABLED
1632
    double duration = WTF::currentTime() - start;
1632
    double duration = monotonicallyIncreasingTime() - start;
1633
    LOG(Media, "AVFWrapper::createImageForTimeInRect(%p) - creating image took %.4f", this, narrowPrecisionToFloat(duration));
1633
    LOG(Media, "AVFWrapper::createImageForTimeInRect(%p) - creating image took %.4f", this, narrowPrecisionToFloat(duration));
1634
#endif
1634
#endif
1635
1635
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm -4 / +4 lines
Lines 850-863 RetainPtr<CGImageRef> MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRe a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec1
850
    ASSERT(m_imageGenerator);
850
    ASSERT(m_imageGenerator);
851
851
852
#if !LOG_DISABLED
852
#if !LOG_DISABLED
853
    double start = WTF::currentTime();
853
    double start = monotonicallyIncreasingTime();
854
#endif
854
#endif
855
855
856
    [m_imageGenerator.get() setMaximumSize:CGSize(rect.size())];
856
    [m_imageGenerator.get() setMaximumSize:CGSize(rect.size())];
857
    RetainPtr<CGImageRef> image = adoptCF([m_imageGenerator.get() copyCGImageAtTime:CMTimeMakeWithSeconds(time, 600) actualTime:nil error:nil]);
857
    RetainPtr<CGImageRef> image = adoptCF([m_imageGenerator.get() copyCGImageAtTime:CMTimeMakeWithSeconds(time, 600) actualTime:nil error:nil]);
858
858
859
#if !LOG_DISABLED
859
#if !LOG_DISABLED
860
    double duration = WTF::currentTime() - start;
860
    double duration = monotonicallyIncreasingTime() - start;
861
    LOG(Media, "MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect(%p) - creating image took %.4f", this, narrowPrecisionToFloat(duration));
861
    LOG(Media, "MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect(%p) - creating image took %.4f", this, narrowPrecisionToFloat(duration));
862
#endif
862
#endif
863
863
Lines 1135-1141 RetainPtr<CVPixelBufferRef> MediaPlayerPrivateAVFoundationObjC::createPixelBuffe a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec2
1135
    ASSERT(m_videoOutput);
1135
    ASSERT(m_videoOutput);
1136
1136
1137
#if !LOG_DISABLED
1137
#if !LOG_DISABLED
1138
    double start = WTF::currentTime();
1138
    double start = monotonicallyIncreasingTime();
1139
#endif
1139
#endif
1140
1140
1141
    CMTime currentTime = [m_avPlayerItem.get() currentTime];
1141
    CMTime currentTime = [m_avPlayerItem.get() currentTime];
Lines 1162-1168 RetainPtr<CVPixelBufferRef> MediaPlayerPrivateAVFoundationObjC::createPixelBuffe a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec3
1162
#endif
1162
#endif
1163
1163
1164
#if !LOG_DISABLED
1164
#if !LOG_DISABLED
1165
    double duration = WTF::currentTime() - start;
1165
    double duration = monotonicallyIncreasingTime() - start;
1166
    LOG(Media, "MediaPlayerPrivateAVFoundationObjC::createPixelBuffer() - creating buffer took %.4f", this, narrowPrecisionToFloat(duration));
1166
    LOG(Media, "MediaPlayerPrivateAVFoundationObjC::createPixelBuffer() - creating buffer took %.4f", this, narrowPrecisionToFloat(duration));
1167
#endif
1167
#endif
1168
1168
- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp -1 / +1 lines
Lines 2526-2532 bool GraphicsLayerCA::setFilterAnimationKeyframes(const KeyframeValueList& value a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp_sec1
2526
2526
2527
void GraphicsLayerCA::suspendAnimations(double time)
2527
void GraphicsLayerCA::suspendAnimations(double time)
2528
{
2528
{
2529
    double t = PlatformCALayer::currentTimeToMediaTime(time ? time : currentTime());
2529
    double t = PlatformCALayer::currentTimeToMediaTime(time ? time : monotonicallyIncreasingTime());
2530
    primaryLayer()->setSpeed(0);
2530
    primaryLayer()->setSpeed(0);
2531
    primaryLayer()->setTimeOffset(t);
2531
    primaryLayer()->setTimeOffset(t);
2532
2532
- a/Source/WebCore/platform/graphics/ca/PlatformCALayer.h -1 / +1 lines
Lines 51-57 typedef Vector<RefPtr<PlatformCALayer> > PlatformCALayerList; a/Source/WebCore/platform/graphics/ca/PlatformCALayer.h_sec1
51
51
52
class PlatformCALayer : public RefCounted<PlatformCALayer> {
52
class PlatformCALayer : public RefCounted<PlatformCALayer> {
53
public:
53
public:
54
    static CFTimeInterval currentTimeToMediaTime(double t) { return CACurrentMediaTime() + t - WTF::currentTime(); }
54
    static CFTimeInterval currentTimeToMediaTime(double t) { return CACurrentMediaTime() + t - monotonicallyIncreasingTime(); }
55
55
56
    // LayerTypeRootLayer is used on some platforms. It has no backing store, so setNeedsDisplay
56
    // LayerTypeRootLayer is used on some platforms. It has no backing store, so setNeedsDisplay
57
    // should not call CACFLayerSetNeedsDisplay, but rather just notify the renderer that it
57
    // should not call CACFLayerSetNeedsDisplay, but rather just notify the renderer that it
- a/Source/WebCore/platform/graphics/ca/mac/LayerPool.mm -3 / +3 lines
Lines 75-81 void LayerPool::addLayer(const RetainPtr<WebTileLayer>& layer) a/Source/WebCore/platform/graphics/ca/mac/LayerPool.mm_sec1
75
    listOfLayersWithSize(layerSize).prepend(layer);
75
    listOfLayersWithSize(layerSize).prepend(layer);
76
    m_totalBytes += backingStoreBytesForSize(layerSize);
76
    m_totalBytes += backingStoreBytesForSize(layerSize);
77
    
77
    
78
    m_lastAddTime = currentTime();
78
    m_lastAddTime = monotonicallyIncreasingTime();
79
    schedulePrune();
79
    schedulePrune();
80
}
80
}
81
81
Lines 93-99 RetainPtr<WebTileLayer> LayerPool::takeLayerWithSize(const IntSize& size) a/Source/WebCore/platform/graphics/ca/mac/LayerPool.mm_sec2
93
unsigned LayerPool::decayedCapacity() const
93
unsigned LayerPool::decayedCapacity() const
94
{
94
{
95
    // Decay to one quarter over capacityDecayTime
95
    // Decay to one quarter over capacityDecayTime
96
    double timeSinceLastAdd = currentTime() - m_lastAddTime;
96
    double timeSinceLastAdd = monotonicallyIncreasingTime() - m_lastAddTime;
97
    if (timeSinceLastAdd > capacityDecayTime)
97
    if (timeSinceLastAdd > capacityDecayTime)
98
        return m_maxBytesForPool / 4;
98
        return m_maxBytesForPool / 4;
99
    float decayProgess = float(timeSinceLastAdd / capacityDecayTime);
99
    float decayProgess = float(timeSinceLastAdd / capacityDecayTime);
Lines 125-131 void LayerPool::pruneTimerFired(Timer<LayerPool>*) a/Source/WebCore/platform/graphics/ca/mac/LayerPool.mm_sec3
125
        // still have a backing store.
125
        // still have a backing store.
126
        oldestReuseList.remove(--oldestReuseList.end());
126
        oldestReuseList.remove(--oldestReuseList.end());
127
    }
127
    }
128
    if (currentTime() - m_lastAddTime <= capacityDecayTime)
128
    if (monotonicallyIncreasingTime() - m_lastAddTime <= capacityDecayTime)
129
        schedulePrune();
129
        schedulePrune();
130
}
130
}
131
131
- a/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm -1 / +1 lines
Lines 61-67 static NSString * const WKNonZeroBeginTimeFlag = @"WKPlatformCAAnimationNonZeroB a/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm_sec1
61
61
62
static double mediaTimeToCurrentTime(CFTimeInterval t)
62
static double mediaTimeToCurrentTime(CFTimeInterval t)
63
{
63
{
64
    return WTF::currentTime() + t - CACurrentMediaTime();
64
    return monotonicallyIncreasingTime() + t - CACurrentMediaTime();
65
}
65
}
66
66
67
// Delegate for animationDidStart callback
67
// Delegate for animationDidStart callback
- a/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp -1 / +1 lines
Lines 309-315 void CACFLayerTreeHost::notifyAnimationsStarted() a/Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.cpp_sec1
309
    // Send currentTime to the pending animations. This function is called by CACF in a callback
309
    // Send currentTime to the pending animations. This function is called by CACF in a callback
310
    // which occurs after the drawInContext calls. So currentTime is very close to the time
310
    // which occurs after the drawInContext calls. So currentTime is very close to the time
311
    // the animations actually start
311
    // the animations actually start
312
    double currentTime = WTF::currentTime();
312
    double currentTime = monotonicallyIncreasingTime();
313
313
314
    HashSet<RefPtr<PlatformCALayer> >::iterator end = m_pendingAnimatedLayers.end();
314
    HashSet<RefPtr<PlatformCALayer> >::iterator end = m_pendingAnimatedLayers.end();
315
    for (HashSet<RefPtr<PlatformCALayer> >::iterator it = m_pendingAnimatedLayers.begin(); it != end; ++it)
315
    for (HashSet<RefPtr<PlatformCALayer> >::iterator it = m_pendingAnimatedLayers.begin(); it != end; ++it)
- a/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp -1 / +1 lines
Lines 771-777 void PlatformCALayer::printTree() const a/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp_sec1
771
    // Print heading info
771
    // Print heading info
772
    CGRect rootBounds = bounds();
772
    CGRect rootBounds = bounds();
773
    fprintf(stderr, "\n\n** Render tree at time %g (bounds %g, %g %gx%g) **\n\n", 
773
    fprintf(stderr, "\n\n** Render tree at time %g (bounds %g, %g %gx%g) **\n\n", 
774
        currentTime(), rootBounds.origin.x, rootBounds.origin.y, rootBounds.size.width, rootBounds.size.height);
774
        monotonicallyIncreasingTime(), rootBounds.origin.x, rootBounds.origin.y, rootBounds.size.width, rootBounds.size.height);
775
775
776
    // Print layer tree from the root
776
    // Print layer tree from the root
777
    printLayer(this, 0);
777
    printLayer(this, 0);
- a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp -1 / +1 lines
Lines 638-644 bool GraphicsLayerTextureMapper::addAnimation(const KeyframeValueList& valueList a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp_sec1
638
    if (valueList.property() == AnimatedPropertyWebkitTransform)
638
    if (valueList.property() == AnimatedPropertyWebkitTransform)
639
        listsMatch = validateTransformOperations(valueList, hasBigRotation) >= 0;
639
        listsMatch = validateTransformOperations(valueList, hasBigRotation) >= 0;
640
640
641
    const double currentTime = WTF::currentTime();
641
    const double currentTime = monotonicallyIncreasingTime();
642
    m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, currentTime - timeOffset, listsMatch));
642
    m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, currentTime - timeOffset, listsMatch));
643
    // m_animationStartTime is the time of the first real frame of animation, now or delayed by a negative offset.
643
    // m_animationStartTime is the time of the first real frame of animation, now or delayed by a negative offset.
644
    if (timeOffset > 0)
644
    if (timeOffset > 0)
- a/Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.cpp -2 / +2 lines
Lines 42-48 TextureMapperFPSCounter::TextureMapperFPSCounter() a/Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.cpp_sec1
42
    m_fpsInterval = showFPSEnvironment.toDouble(&ok);
42
    m_fpsInterval = showFPSEnvironment.toDouble(&ok);
43
    if (ok && m_fpsInterval) {
43
    if (ok && m_fpsInterval) {
44
        m_isShowingFPS = true;
44
        m_isShowingFPS = true;
45
        m_fpsTimestamp = WTF::currentTime();
45
        m_fpsTimestamp = monotonicallyIncreasingTime();
46
    }
46
    }
47
}
47
}
48
48
Lines 52-58 void TextureMapperFPSCounter::updateFPSAndDisplay(TextureMapper* textureMapper, a/Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.cpp_sec2
52
        return;
52
        return;
53
53
54
    m_frameCount++;
54
    m_frameCount++;
55
    double delta = WTF::currentTime() - m_fpsTimestamp;
55
    double delta = monotonicallyIncreasingTime() - m_fpsTimestamp;
56
    if (delta >= m_fpsInterval) {
56
    if (delta >= m_fpsInterval) {
57
        m_lastFPS = int(m_frameCount / delta);
57
        m_lastFPS = int(m_frameCount / delta);
58
        m_frameCount = 0;
58
        m_frameCount = 0;
- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp -1 / +1 lines
Lines 1216-1222 bool CoordinatedGraphicsLayer::addAnimation(const KeyframeValueList& valueList, a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp_sec1
1216
    if (valueList.property() == AnimatedPropertyWebkitTransform)
1216
    if (valueList.property() == AnimatedPropertyWebkitTransform)
1217
        listsMatch = validateTransformOperations(valueList, ignoredHasBigRotation) >= 0;
1217
        listsMatch = validateTransformOperations(valueList, ignoredHasBigRotation) >= 0;
1218
1218
1219
    m_lastAnimationStartTime = WTF::currentTime() - delayAsNegativeTimeOffset;
1219
    m_lastAnimationStartTime = monotonicallyIncreasingTime() - delayAsNegativeTimeOffset;
1220
    m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, m_lastAnimationStartTime, listsMatch));
1220
    m_animations.add(GraphicsLayerAnimation(keyframesName, valueList, boxSize, anim, m_lastAnimationStartTime, listsMatch));
1221
    m_animationStartedTimer.startOneShot(0);
1221
    m_animationStartedTimer.startOneShot(0);
1222
    didChangeAnimations();
1222
    didChangeAnimations();
- a/Source/WebCore/platform/network/DNSResolveQueue.cpp -1 / +1 lines
Lines 58-64 DNSResolveQueue::DNSResolveQueue() a/Source/WebCore/platform/network/DNSResolveQueue.cpp_sec1
58
58
59
bool DNSResolveQueue::isUsingProxy()
59
bool DNSResolveQueue::isUsingProxy()
60
{
60
{
61
    double time = currentTime();
61
    double time = monotonicallyIncreasingTime();
62
    static const double minimumProxyCheckDelay = 5;
62
    static const double minimumProxyCheckDelay = 5;
63
    if (time - m_lastProxyEnabledStatusCheckTime > minimumProxyCheckDelay) {
63
    if (time - m_lastProxyEnabledStatusCheckTime > minimumProxyCheckDelay) {
64
        m_lastProxyEnabledStatusCheckTime = time;
64
        m_lastProxyEnabledStatusCheckTime = time;
- a/Source/WebCore/plugins/win/PluginMessageThrottlerWin.cpp -1 / +1 lines
Lines 86-92 void PluginMessageThrottlerWin::appendMessage(HWND hWnd, UINT msg, WPARAM wParam a/Source/WebCore/plugins/win/PluginMessageThrottlerWin.cpp_sec1
86
86
87
    // If it has been more than MessageDirectProcessingInterval between throttled messages,
87
    // If it has been more than MessageDirectProcessingInterval between throttled messages,
88
    // go ahead and process a message directly.
88
    // go ahead and process a message directly.
89
    double currentTime = WTF::currentTime();
89
    double currentTime = monotonicallyIncreasingTime();
90
    if (currentTime - m_lastMessageTime > MessageDirectProcessingInterval) {
90
    if (currentTime - m_lastMessageTime > MessageDirectProcessingInterval) {
91
        processQueuedMessage();
91
        processQueuedMessage();
92
        m_lastMessageTime = currentTime;
92
        m_lastMessageTime = currentTime;
- a/Source/WebCore/rendering/RenderLayerCompositor.cpp -3 / +3 lines
Lines 424-430 void RenderLayerCompositor::didPaintBacking(RenderLayerBacking*) a/Source/WebCore/rendering/RenderLayerCompositor.cpp_sec1
424
{
424
{
425
    FrameView* frameView = m_renderView->frameView();
425
    FrameView* frameView = m_renderView->frameView();
426
    
426
    
427
    frameView->setLastPaintTime(currentTime());
427
    frameView->setLastPaintTime(monotonicallyIncreasingTime());
428
    
428
    
429
    if (frameView->milestonesPendingPaint() && !m_paintRelatedMilestonesTimer.isActive())
429
    if (frameView->milestonesPendingPaint() && !m_paintRelatedMilestonesTimer.isActive())
430
        m_paintRelatedMilestonesTimer.startOneShot(0);
430
        m_paintRelatedMilestonesTimer.startOneShot(0);
Lines 562-568 void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update a/Source/WebCore/rendering/RenderLayerCompositor.cpp_sec2
562
    double startTime = 0;
562
    double startTime = 0;
563
    if (compositingLogEnabled()) {
563
    if (compositingLogEnabled()) {
564
        ++m_rootLayerUpdateCount;
564
        ++m_rootLayerUpdateCount;
565
        startTime = currentTime();
565
        startTime = monotonicallyIncreasingTime();
566
    }
566
    }
567
#endif
567
#endif
568
568
Lines 614-620 void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update a/Source/WebCore/rendering/RenderLayerCompositor.cpp_sec3
614
    
614
    
615
#if !LOG_DISABLED
615
#if !LOG_DISABLED
616
    if (compositingLogEnabled() && isFullUpdate && (needHierarchyUpdate || needGeometryUpdate)) {
616
    if (compositingLogEnabled() && isFullUpdate && (needHierarchyUpdate || needGeometryUpdate)) {
617
        double endTime = currentTime();
617
        double endTime = monotonicallyIncreasingTime();
618
        LOG(Compositing, "Total layers   primary   secondary   obligatory backing (KB)   secondary backing(KB)   total backing (KB)  update time (ms)\n");
618
        LOG(Compositing, "Total layers   primary   secondary   obligatory backing (KB)   secondary backing(KB)   total backing (KB)  update time (ms)\n");
619
619
620
        LOG(Compositing, "%8d %11d %9d %20.2f %22.2f %22.2f %18.2f\n",
620
        LOG(Compositing, "%8d %11d %9d %20.2f %22.2f %22.2f %18.2f\n",
- a/Source/WebCore/rendering/RenderProgress.cpp -2 / +2 lines
Lines 67-73 bool RenderProgress::canBeReplacedWithInlineRunIn() const a/Source/WebCore/rendering/RenderProgress.cpp_sec1
67
67
68
double RenderProgress::animationProgress() const
68
double RenderProgress::animationProgress() const
69
{
69
{
70
    return m_animating ? (fmod((currentTime() - m_animationStartTime), m_animationDuration) / m_animationDuration) : 0;
70
    return m_animating ? (fmod((monotonicallyIncreasingTime() - m_animationStartTime), m_animationDuration) / m_animationDuration) : 0;
71
}
71
}
72
72
73
bool RenderProgress::isDeterminate() const
73
bool RenderProgress::isDeterminate() const
Lines 94-100 void RenderProgress::updateAnimationState() a/Source/WebCore/rendering/RenderProgress.cpp_sec2
94
94
95
    m_animating = animating;
95
    m_animating = animating;
96
    if (m_animating) {
96
    if (m_animating) {
97
        m_animationStartTime = currentTime();
97
        m_animationStartTime = monotonicallyIncreasingTime();
98
        m_animationTimer.startOneShot(m_animationRepeatInterval);
98
        m_animationTimer.startOneShot(m_animationRepeatInterval);
99
    } else
99
    } else
100
        m_animationTimer.stop();
100
        m_animationTimer.stop();
- a/Source/WebCore/svg/animation/SMILTimeContainer.cpp -5 / +5 lines
Lines 110-116 SMILTime SMILTimeContainer::elapsed() const a/Source/WebCore/svg/animation/SMILTimeContainer.cpp_sec1
110
{
110
{
111
    if (!m_beginTime)
111
    if (!m_beginTime)
112
        return 0;
112
        return 0;
113
    return currentTime() - m_beginTime - m_accumulatedPauseTime;
113
    return monotonicallyIncreasingTime() - m_beginTime - m_accumulatedPauseTime;
114
}
114
}
115
115
116
bool SMILTimeContainer::isActive() const
116
bool SMILTimeContainer::isActive() const
Lines 131-137 bool SMILTimeContainer::isStarted() const a/Source/WebCore/svg/animation/SMILTimeContainer.cpp_sec2
131
void SMILTimeContainer::begin()
131
void SMILTimeContainer::begin()
132
{
132
{
133
    ASSERT(!m_beginTime);
133
    ASSERT(!m_beginTime);
134
    double now = currentTime();
134
    double now = monotonicallyIncreasingTime();
135
135
136
    // If 'm_presetStartTime' is set, the timeline was modified via setElapsed() before the document began.
136
    // If 'm_presetStartTime' is set, the timeline was modified via setElapsed() before the document began.
137
    // In this case pass on 'seekToTime=true' to updateAnimations().
137
    // In this case pass on 'seekToTime=true' to updateAnimations().
Lines 148-154 void SMILTimeContainer::begin() a/Source/WebCore/svg/animation/SMILTimeContainer.cpp_sec3
148
void SMILTimeContainer::pause()
148
void SMILTimeContainer::pause()
149
{
149
{
150
    ASSERT(!isPaused());
150
    ASSERT(!isPaused());
151
    m_pauseTime = currentTime();
151
    m_pauseTime = monotonicallyIncreasingTime();
152
152
153
    if (m_beginTime)
153
    if (m_beginTime)
154
        m_timer.stop();
154
        m_timer.stop();
Lines 159-165 void SMILTimeContainer::resume() a/Source/WebCore/svg/animation/SMILTimeContainer.cpp_sec4
159
    ASSERT(isPaused());
159
    ASSERT(isPaused());
160
160
161
    if (m_beginTime)
161
    if (m_beginTime)
162
        m_accumulatedPauseTime += currentTime() - m_pauseTime;
162
        m_accumulatedPauseTime += monotonicallyIncreasingTime() - m_pauseTime;
163
163
164
    m_pauseTime = 0;
164
    m_pauseTime = 0;
165
    startTimer(0);
165
    startTimer(0);
Lines 176-182 void SMILTimeContainer::setElapsed(SMILTime time) a/Source/WebCore/svg/animation/SMILTimeContainer.cpp_sec5
176
    if (m_beginTime)
176
    if (m_beginTime)
177
        m_timer.stop();
177
        m_timer.stop();
178
178
179
    double now = currentTime();
179
    double now = monotonicallyIncreasingTime();
180
    m_beginTime = now - time.value();
180
    m_beginTime = now - time.value();
181
181
182
    m_accumulatedPauseTime = 0;
182
    m_accumulatedPauseTime = 0;

Return to Bug 119958