Track the paint frequency through a new class named PaintFrequencyTracker
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2018 20:56:50 +0000 (20:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2018 20:56:50 +0000 (20:56 +0000)
commitda3ff0711a18dafb978d7e218aa8c033d30e097b
tree929d56325187731c8018f1b4e877f16af4cc6a71
parent8fca49340c5cdb18fbf2adeff2c6910c43c740df
Track the paint frequency through a new class named PaintFrequencyTracker
https://bugs.webkit.org/show_bug.cgi?id=184311

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-04-04
Reviewed by Antti Koivisto.

PaintFrequencyTracker is a class which detects when a layer is painted
frequently. SinglePaintFrequencyTracking is used in conjunction with
PaintFrequencyTracker to recored a single paint timing.

* rendering/PaintFrequencyTracker.h: Added.
(WebCore::PaintFrequencyTracker::begin):
(WebCore::PaintFrequencyTracker::end):
(WebCore::PaintFrequencyTracker::paintingFrequently const):
Simplify the logic for tracking the paint frequency and move it from
RenderLayer.cpp.

(WebCore::SinglePaintFrequencyTracking::SinglePaintFrequencyTracking):
(WebCore::SinglePaintFrequencyTracking::~SinglePaintFrequencyTracking):
A convenient way to bracket the begin() and the end() methods of
PaintFrequencyTracker.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::calculateClipRects const):
(WebCore::PaintFrequencyInfo::PaintFrequencyInfo): Deleted.
(WebCore::PaintFrequencyInfo::setPaintedCacheableResource): Deleted.
(WebCore::PaintFrequencyInfo::paintingFrequently const): Deleted.
(WebCore::PaintFrequencyInfo::updatePaintFrequency): Deleted.
(WebCore::PaintFrequencyInfo::paintingCacheableResource): Deleted.
* rendering/RenderLayer.h:
Rename PaintFrequencyInfo to PaintFrequencyTracker and move it a separate
header file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/rendering/PaintFrequencyTracker.h [new file with mode: 0644]
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h