blob: 0a0e5fa903fadeef752b8a411f9687da5b54c6c0 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module cc.mojom;
// A surface ID is composed of three parts: a client ID, a local ID, and a
// nonce. The local part and nonce are allocated by the client using any scheme
// that avoids duplicates and makes IDs unguessable respectively. The client ID
// is allocated by the service and will be different for each client.
// The special client_id value 0 is equivalent to the current client.
// This can be used to create, destroy and submit frames to surfaces before
// learning the client ID and to reference other surfaces owned by the same
// client. The actual client ID must be used to pass surface ids to other
// clients for them to reference.
struct SurfaceId {
// A service allocated ID identifying a client.
uint32 client_id;
// An identifier allocated by the client uniquely identifying a surface within
// a client process.
uint32 local_id;
// A cryptographically secure random int chosen to make the SurfaceId
// unguessable by other clients.
uint64 nonce;