#include "components/viz/service/frame_sinks/frame_counter.h"
#include <limits>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/time/time.h"
#include "services/viz/privileged/mojom/compositing/frame_sink_manager.mojom.h"
#include "services/viz/privileged/mojom/compositing/frame_sinks_metrics_recorder.mojom.h"
namespace viz {
namespace {
constexpr size_t kMaxFrameRecords = …;
}
FrameCounter::FrameCounter(base::TimeTicks start_time,
base::TimeDelta bucket_size)
: … { … }
FrameCounter::~FrameCounter() = default;
void FrameCounter::AddFrameSink(const FrameSinkId& frame_sink_id,
mojom::CompositorFrameSinkType type,
bool is_root,
std::string_view debug_label) { … }
void FrameCounter::AddPresentedFrame(const FrameSinkId& frame_sink_id,
base::TimeTicks present_timestamp) { … }
mojom::FrameCountingDataPtr FrameCounter::TakeData() { … }
void FrameCounter::SetFrameSinkType(const FrameSinkId& frame_sink_id,
mojom::CompositorFrameSinkType type) { … }
void FrameCounter::SetFrameSinkDebugLabel(const FrameSinkId& frame_sink_id,
std::string_view debug_label) { … }
}