blob: b335fe1a61e34d306b61fe5884aadb619a50f6aa [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_UI_SCENIC_LIB_SCHEDULING_ID_H_
#define SRC_UI_SCENIC_LIB_SCHEDULING_ID_H_
#include <cstdint>
namespace scheduling {
// ID used to schedule an update on a FrameScheduler client. Each client is assumed to have a
// globally and temporally unique SessionId.
using SessionId = uint64_t;
// ID used to the schedule a present update within a Session. The PresentId is expected to be
// unique, scoped to within each SessionId.
using PresentId = uint64_t;
// Value 0 reserved as invalid.
constexpr scheduling::SessionId INVALID_SESSION_ID = 0u;
// Generates a new global id. Thread-safe.
SessionId GetNextSessionId();
} // namespace scheduling
#endif // SRC_UI_SCENIC_LIB_SCHEDULING_ID_H_