chromium/cc/metrics/dropped_frame_counter.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "cc/metrics/dropped_frame_counter.h"

#include <algorithm>
#include <cmath>
#include <iterator>

#include "base/functional/bind.h"
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_macros.h"
#include "base/ranges/algorithm.h"
#include "base/trace_event/trace_event.h"
#include "build/chromeos_buildflags.h"
#include "cc/metrics/custom_metrics_recorder.h"
#include "cc/metrics/frame_sorter.h"
#include "cc/metrics/total_frame_counter.h"
#include "cc/metrics/ukm_smoothness_data.h"

namespace cc {
namespace {

const base::TimeDelta kDefaultSlidingWindowInterval =;

// The start ranges of each bucket, up to but not including the start of the
// next bucket. The last bucket contains the remaining values.
constexpr double kBucketBounds[7] =;

// Search backwards using the bucket bounds defined above.
size_t DecideSmoothnessBucket(double pdf) {}

}  // namespace

SlidingWindowHistogram;

void SlidingWindowHistogram::AddPercentDroppedFrame(
    double percent_dropped_frame,
    size_t count) {}

uint32_t SlidingWindowHistogram::GetPercentDroppedFramePercentile(
    double percentile) const {}

double SlidingWindowHistogram::GetPercentDroppedFrameVariance() const {}

std::vector<double> SlidingWindowHistogram::GetPercentDroppedFrameBuckets()
    const {}

void SlidingWindowHistogram::Clear() {}

std::ostream& SlidingWindowHistogram::Dump(std::ostream& stream) const {}

std::ostream& operator<<(
    std::ostream& stream,
    const DroppedFrameCounter::SlidingWindowHistogram& histogram) {}

DroppedFrameCounter::DroppedFrameCounter()
    :{}
DroppedFrameCounter::~DroppedFrameCounter() = default;

uint32_t DroppedFrameCounter::GetAverageThroughput() const {}

void DroppedFrameCounter::AddGoodFrame() {}

void DroppedFrameCounter::AddPartialFrame() {}

void DroppedFrameCounter::AddDroppedFrame() {}

void DroppedFrameCounter::ResetPendingFrames(base::TimeTicks timestamp) {}

void DroppedFrameCounter::EnableReporForUI() {}

void DroppedFrameCounter::OnBeginFrame(const viz::BeginFrameArgs& args) {}

void DroppedFrameCounter::OnEndFrame(const viz::BeginFrameArgs& args,
                                     const FrameInfo& frame_info) {}

void DroppedFrameCounter::ReportFrames() {}

void DroppedFrameCounter::ReportFramesOnEveryFrameForUI() {}

double DroppedFrameCounter::GetMostRecentAverageSmoothness() const {}

double DroppedFrameCounter::GetMostRecent95PercentileSmoothness() const {}

void DroppedFrameCounter::SetUkmSmoothnessDestination(
    UkmSmoothnessDataShared* smoothness_data) {}

void DroppedFrameCounter::Reset() {}

base::TimeDelta DroppedFrameCounter::ComputeCurrentWindowSize() const {}

void DroppedFrameCounter::NotifyFrameResult(const viz::BeginFrameArgs& args,
                                            const FrameInfo& frame_info) {}

void DroppedFrameCounter::PopSlidingWindow() {}

void DroppedFrameCounter::UpdateDroppedFrameCountInWindow(
    const FrameInfo& frame_info,
    int count) {}

void DroppedFrameCounter::UpdateMaxPercentDroppedFrame(
    double percent_dropped_frame) {}

void DroppedFrameCounter::OnFcpReceived() {}

void DroppedFrameCounter::SetSortedFrameCallback(SortedFrameCallback callback) {}

}  // namespace cc