Title: [249232] trunk/Source/WebCore
- Revision
- 249232
- Author
- [email protected]
- Date
- 2019-08-28 19:24:03 -0700 (Wed, 28 Aug 2019)
Log Message
PaintFrequencyTracker triggers too many calls to MonotonicTime::now() on layer painting
https://bugs.webkit.org/show_bug.cgi?id=201261
Reviewed by Zalan Bujtas.
MonotonicTime::now() shows up as expensive when painting layer-heavy content, because PaintFrequencyTracker
makes two calls per layer paint.
Halve the number of calls by storing m_lastPaintTime at the start of the paint; doing so doesn't substantially
change the behavior of the tracker.
* rendering/PaintFrequencyTracker.h:
(WebCore::PaintFrequencyTracker::begin):
(WebCore::PaintFrequencyTracker::end):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (249231 => 249232)
--- trunk/Source/WebCore/ChangeLog 2019-08-29 02:10:04 UTC (rev 249231)
+++ trunk/Source/WebCore/ChangeLog 2019-08-29 02:24:03 UTC (rev 249232)
@@ -1,3 +1,20 @@
+2019-08-28 Simon Fraser <[email protected]>
+
+ PaintFrequencyTracker triggers too many calls to MonotonicTime::now() on layer painting
+ https://bugs.webkit.org/show_bug.cgi?id=201261
+
+ Reviewed by Zalan Bujtas.
+
+ MonotonicTime::now() shows up as expensive when painting layer-heavy content, because PaintFrequencyTracker
+ makes two calls per layer paint.
+
+ Halve the number of calls by storing m_lastPaintTime at the start of the paint; doing so doesn't substantially
+ change the behavior of the tracker.
+
+ * rendering/PaintFrequencyTracker.h:
+ (WebCore::PaintFrequencyTracker::begin):
+ (WebCore::PaintFrequencyTracker::end):
+
2019-08-28 Ross Kirsling <[email protected]>
Unreviewed. Restabilize non-unified build.
Modified: trunk/Source/WebCore/rendering/PaintFrequencyTracker.h (249231 => 249232)
--- trunk/Source/WebCore/rendering/PaintFrequencyTracker.h 2019-08-29 02:10:04 UTC (rev 249231)
+++ trunk/Source/WebCore/rendering/PaintFrequencyTracker.h 2019-08-29 02:24:03 UTC (rev 249232)
@@ -61,14 +61,15 @@
// - The frame rate to paint this renderer has been at least 31.25 FPS.
m_paintFrequency = PaintFrequency::High;
}
+
+ m_lastPaintTime = now;
+ ++m_totalPaints;
}
void end()
{
- m_lastPaintTime = MonotonicTime::now();
ASSERT(m_firstPaintTime);
ASSERT(m_firstPaintTime <= m_lastPaintTime);
- ++m_totalPaints;
}
bool paintingFrequently() const { return m_paintFrequency == PaintFrequency::High; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes