// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CC_SCHEDULER_BEGIN_FRAME_TRACKER_H_ #define CC_SCHEDULER_BEGIN_FRAME_TRACKER_H_ #include <set> #include <string> #include "base/time/time.h" #include "cc/cc_export.h" #include "components/viz/common/frame_sinks/begin_frame_args.h" namespace perfetto { class EventContext; namespace protos { namespace pbzero { class BeginImplFrameArgsV2; } } // namespace protos } // namespace perfetto namespace cc { // Microclass to trace and check properties for correct BeginFrameArgs (BFA) // usage and provide a few helper methods. // // With DCHECKs enable, this class checks the following "invariants"; // * BFA are monotonically increasing. // * BFA is valid. // * The BFA is only used inside a given period. // * A new BFA isn't used before the last BFA is finished with. // // With the tracing category "cc.debug.scheduler.frames" enabled the tracker // will output the following trace information; // * Time period for which the BFA is in usage. // * The flow of BFA as they are passed between tracking objects. // // TODO(mithro): Record stats about the viz::BeginFrameArgs class CC_EXPORT BeginFrameTracker { … }; } // namespace cc #endif // CC_SCHEDULER_BEGIN_FRAME_TRACKER_H_