chromium/third_party/blink/renderer/core/paint/timing/first_meaningful_paint_detector.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/paint/timing/first_meaningful_paint_detector.h"

#include "base/time/default_tick_clock.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/core/css/font_face_set_document.h"
#include "third_party/blink/renderer/core/paint/timing/paint_timing.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"

namespace blink {

namespace {

// Web fonts that laid out more than this number of characters block First
// Meaningful Paint.
const int kBlankCharactersThreshold =;

const base::TickClock* g_clock =;
}  // namespace

FirstMeaningfulPaintDetector& FirstMeaningfulPaintDetector::From(
    Document& document) {}

FirstMeaningfulPaintDetector::FirstMeaningfulPaintDetector(
    PaintTiming* paint_timing)
    :{}

Document* FirstMeaningfulPaintDetector::GetDocument() {}

// Computes "layout significance" (http://goo.gl/rytlPL) of a layout operation.
// Significance of a layout is the number of layout objects newly added to the
// layout tree, weighted by page height (before and after the layout).
// A paint after the most significance layout during page load is reported as
// First Meaningful Paint.
void FirstMeaningfulPaintDetector::MarkNextPaintAsMeaningfulIfNeeded(
    const LayoutObjectCounter& counter,
    double contents_height_before_layout,
    double contents_height_after_layout,
    int visible_height) {}

void FirstMeaningfulPaintDetector::NotifyPaint() {}

// This is called only on FirstMeaningfulPaintDetector for main frame.
void FirstMeaningfulPaintDetector::NotifyInputEvent() {}

void FirstMeaningfulPaintDetector::OnNetwork2Quiet() {}

bool FirstMeaningfulPaintDetector::SeenFirstMeaningfulPaint() const {}

void FirstMeaningfulPaintDetector::RegisterNotifyPresentationTime(
    PaintEvent event) {}

void FirstMeaningfulPaintDetector::ReportPresentationTime(
    PaintEvent event,
    const viz::FrameTimingDetails& presentation_details) {}

void FirstMeaningfulPaintDetector::NotifyFirstContentfulPaint(
    base::TimeTicks presentation_time) {}

void FirstMeaningfulPaintDetector::SetFirstMeaningfulPaint(
    base::TimeTicks presentation_time) {}

// static
void FirstMeaningfulPaintDetector::SetTickClockForTesting(
    const base::TickClock* clock) {}

void FirstMeaningfulPaintDetector::Trace(Visitor* visitor) const {}

}  // namespace blink