| Index: third_party/WebKit/Source/core/paint/PaintTiming.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintTiming.cpp b/third_party/WebKit/Source/core/paint/PaintTiming.cpp
|
| index 799970f6eb3607a3bd41f451192601efc0fe2d9d..27902b2aaee57c3c94862b9e4a30191aef6a097b 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintTiming.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintTiming.cpp
|
| @@ -140,6 +140,10 @@
|
| if (first_paint_ != 0.0)
|
| return;
|
| first_paint_ = stamp;
|
| + Performance* performance = GetPerformanceInstance(GetFrame());
|
| + if (performance)
|
| + performance->AddFirstPaintTiming(first_paint_);
|
| +
|
| TRACE_EVENT_INSTANT1("loading,rail,devtools.timeline", "firstPaint",
|
| TRACE_EVENT_SCOPE_PROCESS, "frame", GetFrame());
|
| RegisterNotifySwapTime(PaintEvent::kFirstPaint);
|
| @@ -150,6 +154,10 @@
|
| return;
|
| SetFirstPaint(stamp);
|
| first_contentful_paint_ = stamp;
|
| + Performance* performance = GetPerformanceInstance(GetFrame());
|
| + if (performance)
|
| + performance->AddFirstContentfulPaintTiming(first_contentful_paint_);
|
| +
|
| TRACE_EVENT_INSTANT1("loading,rail,devtools.timeline", "firstContentfulPaint",
|
| TRACE_EVENT_SCOPE_PROCESS, "frame", GetFrame());
|
| RegisterNotifySwapTime(PaintEvent::kFirstContentfulPaint);
|
| @@ -174,18 +182,12 @@
|
| double timestamp) {
|
| if (!did_swap)
|
| return;
|
| -
|
| - Performance* performance = GetPerformanceInstance(GetFrame());
|
| switch (event) {
|
| case PaintEvent::kFirstPaint:
|
| first_paint_swap_ = timestamp;
|
| - if (performance)
|
| - performance->AddFirstPaintTiming(first_paint_);
|
| return;
|
| case PaintEvent::kFirstContentfulPaint:
|
| first_contentful_paint_swap_ = timestamp;
|
| - if (performance)
|
| - performance->AddFirstContentfulPaintTiming(first_contentful_paint_);
|
| return;
|
| case PaintEvent::kFirstMeaningfulPaint:
|
| first_meaningful_paint_swap_ = timestamp;
|
|
|