| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module cc.mojom; | 5 module cc.mojom; |
| 6 | 6 |
| 7 import "mojo/common/common_custom_types.mojom"; |
| 8 |
| 7 // A surface ID is composed of three parts: a client ID, a local ID, and a | 9 // A surface ID is composed of three parts: a client ID, a local ID, and a |
| 8 // nonce. The local part and nonce are allocated by the client using any scheme | 10 // nonce. The local part and nonce are allocated by the client using any scheme |
| 9 // that avoids duplicates and makes IDs unguessable respectively. The client ID | 11 // that avoids duplicates and makes IDs unguessable respectively. The client ID |
| 10 // is allocated by the service and will be different for each client. | 12 // is allocated by the service and will be different for each client. |
| 11 // | 13 // |
| 12 // The special client_id value 0 is equivalent to the current client. | 14 // The special client_id value 0 is equivalent to the current client. |
| 13 // This can be used to create, destroy and submit frames to surfaces before | 15 // This can be used to create, destroy and submit frames to surfaces before |
| 14 // learning the client ID and to reference other surfaces owned by the same | 16 // learning the client ID and to reference other surfaces owned by the same |
| 15 // client. The actual client ID must be used to pass surface ids to other | 17 // client. The actual client ID must be used to pass surface ids to other |
| 16 // clients for them to reference. | 18 // clients for them to reference. |
| 17 struct SurfaceId { | 19 struct SurfaceId { |
| 18 // A service allocated ID identifying a client. | 20 // A service allocated ID identifying a client. |
| 19 uint32 client_id; | 21 uint32 client_id; |
| 20 | 22 |
| 21 // An identifier allocated by the client uniquely identifying a surface within | 23 // An identifier allocated by the client uniquely identifying a surface within |
| 22 // a client process. | 24 // a client process. |
| 23 uint32 local_id; | 25 uint32 local_id; |
| 24 | 26 |
| 25 // A cryptographically secure random int chosen to make the SurfaceId | 27 // A cryptographically secure random int chosen to make the SurfaceId |
| 26 // unguessable by other clients. | 28 // unguessable by other clients. |
| 27 uint64 nonce; | 29 mojo.common.mojom.UnguessableToken nonce; |
| 28 }; | 30 }; |
| OLD | NEW |