liyujie
2025-08-28 b3810562527858a3b3d98ffa6e9c9c5b0f4a9a8e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright 2017 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.
 
library fuchsia.ui.gfx;
 
// These are the types of nodes that can be created within a Mozart |Session|.
//
// All nodes have an associated transform, which distinguishes them from mere
// resources.  Nodes may also have one or more node Characteristics:
//
// These are characteristics that each type of |Node| either has or doesn't.
// These constrain operations that reference nodes; violations will cause the
// |Session| connection to be closed.  For example, |NodeAddChildOp| must target
// a node with the "has_children" characteristic.  These characteristics are not
// explicitly reflected in the Session API; instead, they must be enforced by
// implementations of the API.
// - has_children: The node can contain other nodes as children.
// - has_parent: The node can be a child of another node.  If this is false,
//   the node can only be a direct descendant of its containing scene.
// - has_parts:  The node can contain other nodes as parts.  All parts must be
//   from the same session as their parent.
// - has_clip:  The node can contain a clip node as a child.
// - is_clip:  The node can clip other nodes.
// - has_shape: The node can contain ShapeNodes as children.
// - has_material:  The node can have a Material resource applied to it.
 
// Characteristics:
// - has_parent
// - has_shape
// - has_material
struct ShapeNodeArgs {
  // TODO(SCN-694): Clean up dummy args.
  uint32 unused = 0;
};
 
// Characteristics:
// - has_parent
// - is_clip
// - has_parts
struct ClipNodeArgs {
  // TODO(SCN-694): Clean up dummy args.
  uint32 unused = 0;
};
 
// Characteristics:
// - has_transform
// - has_parent
// - has_children
// - has_parts
// - has_opacity
struct OpacityNodeArgs {
    uint32 unused = 0;
};
 
// Characteristics:
// - has_transform
// - has_children
// - has_parent
// - has_parts
// - has_clip
struct EntityNodeArgs {
  // TODO(SCN-694): Clean up dummy args.
  uint32 unused = 0;
};