chromium/ui/compositor/throughput_tracker.h

// 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.

#ifndef UI_COMPOSITOR_THROUGHPUT_TRACKER_H_
#define UI_COMPOSITOR_THROUGHPUT_TRACKER_H_

#include "base/functional/callback_forward.h"
#include "base/memory/weak_ptr.h"
#include "ui/compositor/compositor_export.h"
#include "ui/compositor/throughput_tracker_host.h"

namespace ui {

class Compositor;
class ThroughputTrackerHost;

// A class to track the throughput of Compositor. The tracking is identified by
// an id. The id is passed into impl side and be used as the sequence id to
// create and stop a kCustom typed cc::FrameSequenceTracker. The class is
// move-only to have only one holder of the id. When ThroughputTracker is
// destroyed with an active tracking, the tracking will be canceled and report
// callback will not be invoked.
class COMPOSITOR_EXPORT ThroughputTracker {};

}  // namespace ui

#endif  // UI_COMPOSITOR_THROUGHPUT_TRACKER_H_