chromium/services/viz/public/mojom/compositing/begin_frame_args.mojom

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module viz.mojom;

import "mojo/public/mojom/base/time.mojom";

enum BeginFrameArgsType {
  INVALID,
  NORMAL,
  MISSED
};

// See components/viz/common/frame_sinks/begin_frame_args.h.
struct BeginFrameArgs {
  mojo_base.mojom.TimeTicks frame_time;
  mojo_base.mojom.TimeTicks deadline;
  mojo_base.mojom.TimeDelta interval;
  uint64 source_id;
  uint64 sequence_number;
  uint64 frames_throttled_since_last;
  int64 trace_id;
  mojo_base.mojom.TimeTicks dispatch_time;
  mojo_base.mojom.TimeTicks client_arrival_time;
  BeginFrameArgsType type;
  bool on_critical_path;
  bool animate_only;
};

// See components/viz/common/frame_sinks/begin_frame_args.h.
struct BeginFrameAck {
  uint64 source_id;
  uint64 sequence_number;
  int64 trace_id;
  bool has_damage;

  // Specifies the interval at which the client's content is updated. This can
  // be used to configure the display to the optimal vsync interval available.
  // If unspecified, or set to BeginFrameArgs::MinInterval, it is assumed that
  // the client can animate at the maximum frame rate supported by the Display.
  mojo_base.mojom.TimeDelta? preferred_frame_interval;
};