blob: a18ae0c0136ebf65655e901c59dd515af5f51451 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "core/timing/PerformancePaintTiming.h"
#include "bindings/core/v8/V8ObjectBuilder.h"
namespace blink {
PerformancePaintTiming::PerformancePaintTiming(PaintType type,
double start_time)
: PerformanceEntry(FromPaintTypeToString(type),
"paint",
start_time,
start_time) {}
PerformancePaintTiming::~PerformancePaintTiming() {}
String PerformancePaintTiming::FromPaintTypeToString(PaintType type) {
switch (type) {
case PaintType::kFirstPaint:
return "first-paint";
case PaintType::kFirstContentfulPaint:
return "first-contentful-paint";
}
NOTREACHED();
return "";
}
} // namespace blink