| // 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 "mojo/public/mojom/base/time.mojom"; |
| import "services/viz/public/mojom/compositing/compositor_render_pass_id.mojom"; |
| import "services/viz/public/mojom/compositing/shared_element_resource_id.mojom"; |
| |
| enum CompositorFrameTransitionDirectiveType { |
| kSave, |
| kAnimate, |
| kAnimateRenderer, |
| kRelease |
| }; |
| |
| enum CompositorFrameTransitionDirectiveEffect { |
| kNone, |
| kCoverDown, |
| kCoverLeft, |
| kCoverRight, |
| kCoverUp, |
| kExplode, |
| kFade, |
| kImplode, |
| kRevealDown, |
| kRevealLeft, |
| kRevealRight, |
| kRevealUp |
| }; |
| |
| // This struct identifes a shared element. |
| struct CompositorFrameTransitionDirectiveSharedElement { |
| CompositorRenderPassId render_pass_id; |
| SharedElementResourceId shared_element_resource_id; |
| }; |
| |
| // See components/viz/common/quads/compositor_frame_transition_directive.h |
| // for a description of this struct. |
| struct CompositorFrameTransitionDirective { |
| // A monotonically increasing sequence_id for a given communication channel |
| // (i.e. surface). This is used to distinguish new directives from directives |
| // that have already been processed. |
| uint32 sequence_id; |
| |
| // The type of this directive. |
| CompositorFrameTransitionDirectiveType type; |
| |
| // The effect for the transition. |
| CompositorFrameTransitionDirectiveEffect effect; |
| |
| // A collection of shared elements. |
| array<CompositorFrameTransitionDirectiveSharedElement> shared_elements; |
| }; |