⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249266 in webkit


Ignore:
Timestamp:
Aug 29, 2019, 6:11:08 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r249232 - 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):

Location:
releases/WebKitGTK/webkit-2.26/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.26/Source/WebCore/ChangeLog

    r249264 r249266  
     12019-08-28  Simon Fraser  <simon.fraser@apple.com>
     2
     3        PaintFrequencyTracker triggers too many calls to MonotonicTime::now() on layer painting
     4        https://bugs.webkit.org/show_bug.cgi?id=201261
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        MonotonicTime::now() shows up as expensive when painting layer-heavy content, because PaintFrequencyTracker
     9        makes two calls per layer paint.
     10
     11        Halve the number of calls by storing m_lastPaintTime at the start of the paint; doing so doesn't substantially
     12        change the behavior of the tracker.
     13
     14        * rendering/PaintFrequencyTracker.h:
     15        (WebCore::PaintFrequencyTracker::begin):
     16        (WebCore::PaintFrequencyTracker::end):
     17
    1182019-08-28  Ross Kirsling  <ross.kirsling@sony.com>
    219
  • releases/WebKitGTK/webkit-2.26/Source/WebCore/rendering/PaintFrequencyTracker.h

    r230274 r249266  
    6262            m_paintFrequency = PaintFrequency::High;
    6363        }
     64
     65        m_lastPaintTime = now;
     66        ++m_totalPaints;
    6467    }
    6568
    6669    void end()
    6770    {
    68         m_lastPaintTime = MonotonicTime::now();
    6971        ASSERT(m_firstPaintTime);
    7072        ASSERT(m_firstPaintTime <= m_lastPaintTime);
    71         ++m_totalPaints;
    7273    }
    7374
Note: See TracChangeset for help on using the changeset viewer.