chromium/ui/compositor/presentation_time_recorder.cc

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

#include "ui/compositor/presentation_time_recorder.h"

#include <ostream>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/metrics/histogram.h"
#include "base/trace_event/trace_event.h"

namespace ui {

namespace {

bool report_immediately_for_test =;

}  // namespace

// PresentationTimeRecorderInternal -------------------------------------------

class PresentationTimeRecorder::PresentationTimeRecorderInternal
    : public ui::CompositorObserver {};

bool PresentationTimeRecorder::PresentationTimeRecorderInternal::RequestNext() {}

void PresentationTimeRecorder::PresentationTimeRecorderInternal::OnPresented(
    int count,
    base::TimeTicks requested_time,
    const viz::FrameTimingDetails& frame_timing_details) {}

void PresentationTimeRecorder::PresentationTimeRecorderInternal::
    SelfDestruct() {}

// PresentationTimeRecorder ---------------------------------------------------

PresentationTimeRecorder::PresentationTimeRecorder(
    raw_ptr<PresentationTimeRecorderInternal> internal)
    :{}

PresentationTimeRecorder::~PresentationTimeRecorder() {}

bool PresentationTimeRecorder::RequestNext() {}

std::optional<base::TimeDelta> PresentationTimeRecorder::GetAverageLatency()
    const {}

// static
void PresentationTimeRecorder::SetReportPresentationTimeImmediatelyForTest(
    bool enable) {}

namespace {

base::HistogramBase* CreateTimesHistogram(const char* name,
                                          base::TimeDelta maximum) {}

// PresentationTimeHistogramRecorder ------------------------------------------

class PresentationTimeHistogramRecorder
    : public PresentationTimeRecorder::PresentationTimeRecorderInternal {};

}  // namespace

std::unique_ptr<PresentationTimeRecorder>
CreatePresentationTimeHistogramRecorder(
    ui::Compositor* compositor,
    const char* presentation_time_histogram_name,
    const char* max_latency_histogram_name,
    base::TimeDelta maximum,
    bool emit_trace_event) {}

// TestApi --------------------------------------------------------------------

PresentationTimeRecorder::TestApi::TestApi(PresentationTimeRecorder* recorder)
    :{}

void PresentationTimeRecorder::TestApi::OnCompositingDidCommit(
    ui::Compositor* compositor) {}

void PresentationTimeRecorder::TestApi::OnPresented(
    int count,
    base::TimeTicks requested_time,
    const viz::FrameTimingDetails& frame_timing_details) {}

}  // namespace ui