| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Primitives express the geometry of the scene, such as quads and references | 5 // Primitives express the geometry of the scene, such as quads and references |
| 6 // to embedded scenes. Primitives are arranged hierarchically as nodes, | 6 // to embedded scenes. Primitives are arranged hierarchically as nodes, |
| 7 // each with an associated transformation matrix. | 7 // each with an associated transformation matrix. |
| 8 | 8 |
| 9 [DartPackage="mojo_services"] | 9 [DartPackage="mojo_services"] |
| 10 module mojo.gfx.composition; | 10 module mojo.gfx.composition; |
| 11 | 11 |
| 12 import "mojo/services/geometry/interfaces/geometry.mojom"; | 12 import "mojo/services/geometry/interfaces/geometry.mojom"; |
| 13 import "mojo/services/gfx/composition/interfaces/hit_tests.mojom"; | 13 import "mojo/services/gfx/composition/interfaces/hit_tests.mojom"; |
| 14 | 14 |
| 15 // Nodes express the geometry and content of the scene, such as images and | 15 // Nodes express the geometry and content of the scene, such as images and |
| 16 // references to embedded scenes. Nodes are arranged to form a directed | 16 // references to embedded scenes. Nodes are arranged to form a directed |
| 17 // acyclic graph of drawing commands. | 17 // acyclic graph of drawing commands. |
| 18 // | 18 // |
| 19 // The node graph is processed in pre-order traversal. Starting from the | 19 // The node graph is processed in pre-order traversal. Starting from the |
| 20 // root, the compositor applies the transformation, clip, recursively | 20 // root, the compositor applies the transformation, clip, applies the |
| 21 // processes the node's children according to the node's combinator rule, | 21 // node's operation (if any), then recursively processes the node's children |
| 22 // then applies the node's own operation. | 22 // according to the node's combinator rule. |
| 23 // | 23 // |
| 24 // BLOCKED NODES | 24 // BLOCKED NODES |
| 25 // | 25 // |
| 26 // Due to the asynchronous nature of the system, it may happen that some | 26 // Due to the asynchronous nature of the system, it may happen that some |
| 27 // nodes cannot be processed immediately at drawing time because they require | 27 // nodes cannot be processed immediately at drawing time because they require |
| 28 // access to certain resources which are not available, such as a specific | 28 // access to certain resources which are not available, such as a specific |
| 29 // version of a scene which has yet to be produced by some other application. | 29 // version of a scene which has yet to be produced by some other application. |
| 30 // | 30 // |
| 31 // When a node cannot be drawn due to an unsatisfied dependency, it is | 31 // When a node cannot be drawn due to an unsatisfied dependency, it is |
| 32 // said to be "blocked". Blocked nodes prevent rendering of the entire | 32 // said to be "blocked". Blocked nodes prevent rendering of the entire |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 // Specifies how blending should take place. | 210 // Specifies how blending should take place. |
| 211 struct Blend { | 211 struct Blend { |
| 212 // The opacity for composition in a range from 0 (fully transparent) | 212 // The opacity for composition in a range from 0 (fully transparent) |
| 213 // to 255 (fully opaque). | 213 // to 255 (fully opaque). |
| 214 uint8 alpha = 255; | 214 uint8 alpha = 255; |
| 215 | 215 |
| 216 // TODO(jeffbrown): Blend modes and texture filtering. | 216 // TODO(jeffbrown): Blend modes and texture filtering. |
| 217 }; | 217 }; |
| OLD | NEW |