[M108 Migration][VD] Avoid pending frame counter becoming negative
[platform/framework/web/chromium-efl.git] / cc / metrics / custom_metrics_recorder.h
1 // Copyright 2022 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_METRICS_CUSTOM_METRICS_RECORDER_H_
6 #define CC_METRICS_CUSTOM_METRICS_RECORDER_H_
7
8 #include "cc/cc_export.h"
9
10 namespace cc {
11
12 // Customize cc metric recording. E.g. reporting metrics under different names.
13 class CC_EXPORT CustomMetricRecorder {
14  public:
15   static CustomMetricRecorder* Get();
16
17   // Invoked to report "PercentDroppedFrames_1sWindow".
18   virtual void ReportPercentDroppedFramesInOneSecoundWindow(double percent) = 0;
19
20  protected:
21   CustomMetricRecorder();
22   virtual ~CustomMetricRecorder();
23 };
24
25 }  // namespace cc
26
27 #endif  // CC_METRICS_CUSTOM_METRICS_RECORDER_H_