Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintTiming.h |
| diff --git a/third_party/WebKit/Source/core/paint/PaintTiming.h b/third_party/WebKit/Source/core/paint/PaintTiming.h |
| index ba2d02f7cd96fcccf423c505dcdc4fa2b7bbe70e..9664fbef1f8dbb2188a0ab079870c97d420cd59f 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintTiming.h |
| +++ b/third_party/WebKit/Source/core/paint/PaintTiming.h |
| @@ -26,6 +26,12 @@ class CORE_EXPORT PaintTiming final |
| public: |
| virtual ~PaintTiming() {} |
| + enum class PaintEvent { |
| + kFirstPaint, |
| + kFirstContentfulPaint, |
| + kFirstMeaningfulPaint |
| + }; |
| + |
| static PaintTiming& From(Document&); |
| // mark*() methods record the time for the given paint event, record a trace |
| @@ -82,6 +88,7 @@ class CORE_EXPORT PaintTiming final |
| return *fmp_detector_; |
| } |
| + void ReportSwapTime(PaintEvent, bool did_swap, double timestamp); |
|
sunnyps
2017/05/02 01:20:46
nit: newline after ReportSwapTime
panicker
2017/05/02 21:21:36
Done.
|
| DECLARE_VIRTUAL_TRACE(); |
| private: |
| @@ -101,11 +108,16 @@ class CORE_EXPORT PaintTiming final |
| // time has not yet been recorded. |
| void SetFirstContentfulPaint(double stamp); |
| + void RegisterNotifySwapTime(PaintEvent); |
| + |
| double first_paint_ = 0.0; |
| + double first_paint_swap_ = 0.0; |
| double first_text_paint_ = 0.0; |
| double first_image_paint_ = 0.0; |
| double first_contentful_paint_ = 0.0; |
| + double first_contentful_paint_swap_ = 0.0; |
| double first_meaningful_paint_ = 0.0; |
| + double first_meaningful_paint_swap_ = 0.0; |
| double first_meaningful_paint_candidate_ = 0.0; |
| Member<FirstMeaningfulPaintDetector> fmp_detector_; |