#include "cc/metrics/scroll_jank_dropped_frame_tracker.h"
#include <algorithm>
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "base/trace_event/common/trace_event_common.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_id_helper.h"
#include "base/trace_event/typed_macros.h"
namespace cc {
namespace {
enum class PerScrollHistogramType { … };
constexpr int kVsyncCountsMin = …;
constexpr int kVsyncCountsMax = …;
constexpr int kVsyncCountsBuckets = …;
const char* GetPerScrollHistogramName(int num_frames,
PerScrollHistogramType type) { … }
const char* GetPerVsyncScrollHistogramName(int num_vsyncs,
PerScrollHistogramType type) { … }
}
ScrollJankDroppedFrameTracker::ScrollJankDroppedFrameTracker() { … }
ScrollJankDroppedFrameTracker::~ScrollJankDroppedFrameTracker() { … }
void ScrollJankDroppedFrameTracker::EmitPerScrollHistogramsAndResetCounters() { … }
void ScrollJankDroppedFrameTracker::
EmitPerScrollVsyncHistogramsAndResetCounters() { … }
void ScrollJankDroppedFrameTracker::EmitPerWindowHistogramsAndResetCounters() { … }
void ScrollJankDroppedFrameTracker::
EmitPerVsyncWindowHistogramsAndResetCounters() { … }
void ScrollJankDroppedFrameTracker::ReportLatestPresentationData(
ScrollUpdateEventMetrics& earliest_event,
base::TimeTicks last_input_generation_ts,
base::TimeTicks presentation_ts,
base::TimeDelta vsync_interval) { … }
void ScrollJankDroppedFrameTracker::OnScrollStarted() { … }
}