// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_VIZ_COMMON_QUADS_FRAME_DEADLINE_H_ #define COMPONENTS_VIZ_COMMON_QUADS_FRAME_DEADLINE_H_ #include <optional> #include <string> #include "base/time/time.h" #include "components/viz/common/frame_sinks/begin_frame_args.h" #include "components/viz/common/viz_common_export.h" namespace viz { // FrameDeadline is a class that represents a CompositorFrame's deadline for // activation. The deadline consists of three components: start time, deadline // in frames, and frame interval. All three components are stored individually // in this class in order to allow resolution of this deadline that incorporates // a system default deadline in the Viz service. In particular, the computation // to translate FrameDeadline into wall time is: // if use system default lower bound deadline: // start time + max(deadline in frames, default deadline) * frame interval // else: // start time + deadline in frames * frame interval class VIZ_COMMON_EXPORT FrameDeadline { … }; VIZ_COMMON_EXPORT std::ostream& operator<<(std::ostream& out, const FrameDeadline& frame_deadline); } // namespace viz #endif // COMPONENTS_VIZ_COMMON_QUADS_FRAME_DEADLINE_H_