#include "components/viz/service/display/overdraw_tracker.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <vector>
#include "base/check.h"
#include "base/check_op.h"
#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "components/viz/common/quads/aggregated_render_pass.h"
#include "components/viz/common/quads/shared_quad_state.h"
#include "components/viz/service/display/aggregated_frame.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/transform.h"
namespace viz {
namespace {
constexpr size_t kMaxRecords = …;
void LogAverageOverdrawCountUMA(float overdraw) { … }
}
void OverdrawTracker::EstimateAndRecordOverdrawAsUMAMetric(
const AggregatedFrame* frame) { … }
float OverdrawTracker::EstimateOverdraw(const AggregatedFrame* frame) { … }
OverdrawTracker::OverdrawTracker(const Settings& settings)
: … { … }
OverdrawTracker::~OverdrawTracker() = default;
void OverdrawTracker::EstimateAndRecordOverdraw(const AggregatedFrame* frame,
base::TimeTicks timestamp) { … }
OverdrawTracker::OverdrawTimeSeries OverdrawTracker::TakeDataAsTimeSeries()
const { … }
void OverdrawTracker::Reset() { … }
void OverdrawTracker::Record(float overdraw, base::TimeTicks timestamp) { … }
size_t OverdrawTracker::GetIntervalIndex(base::TimeTicks timestamp) const { … }
}