// Copyright 2021 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 "third_party/blink/public/mojom/tokens/tokens.mojom"; // An identifier for a texture representing the content of a shared element. The // id is created in the renderer process and used to embed this content in // CompositorFrames. Viz scopes the access to this resource to the renderer // process which created it. // // This ID is created by the renderer process and shared with the Viz process // in CompositorFrames. Its usage is scoped to a single CompositorFrameSink IPC // interface. This means that the ID is created and used by a single renderer // process. The content cached for one renderer process can not, in general, be // embedded in frames generated by a different renderer process. The only // exception to this is when a view transition is occurring across documents, // where the documents are required to be same-origin, and the documents are in // separate processes. This can happen, for example, when navigating to a // prerendered document. // // The ID is composed of a `transition_token` which identifies a specific view // transition. The `local_id` identifies a specific snapshot resource and is // unique only with respect to a given `transition_token`. struct ViewTransitionElementResourceId { blink.mojom.ViewTransitionToken? transition_token; uint32 local_id; // A special "scope snapshot" is used for non-document transitions as well as // same-site iframe document transitions in order to pause rendering during // the callback. These need to be treated as distinct from the shared elements // that render the transition's participants. bool for_scope_snapshot; };