|
Initial checkin of the new Mozart compositor.
The Mozart compositor is designed to support feed forward rendering of
scene graphs using scene version codes and node combinators to
determine synchronization behaviors.
A unique characteristic of Mozart is its ability to allow clients to
specify how to resolve situations where content is missing or not ready
by supplying alternative choices for what should be rendered. The goal
is to avoid stalls by allowing more flexibility in specifying how scene
state updates are coordinated.
The scene graph consists of nodes of various types which represent
primitive operations such as filling a rectangle, drawing an image,
or embedding another scene.
The children of each node are composed according to the node's combinator
rule. The default MERGE combinator rule simply draws all children
sequentially and refuses to draw anying if any of the children are blocked.
Other rules, such as FALLBACK, allow for alternative choices to be
made by the compositor at snapshot time based on what is available.
In the simplest cases, a client might provide substitute content to be
used in case the primary content is not yet ready. In more elaborate
cases, a client might describe how an older version of the primary content
can be adapted to fit current demands, perhaps scaling or cropping it
as required.
The compositor itself is designed to be relatively unopinionated about
the contents that it is compositing. Applications publish their scenes
and Mozart composites them, that's it. High-level functionality such
as maintaining view embedding relationships or input dispatch are
exclusively handled by other components.
Mozart also offers:
- A relatively easy to use client interface.
- Vsync based scheduling.
- Hit testing (only partially implemented in this patch).
- Support for clients which use separate threads for event processing
and rendering.
- Multi-display support (only partially implemented in this patch).
The rasterizer is currently implemented using Skia and Ganesh and runs
on a separate thread from the main engine.
This initial patch covers most of the essentials but there's plenty
more testing, optimization, and elaboration to do later.
This patch is followed by several others which serve to update the
view manager to use the new compositor, add various helpers,
update examples, and so on.
BUG=
R=abarth@google.com
Committed: https://chromium.googlesource.com/external/mojo/+/751f4d3c32cbd11f0bfd44c5facf6c62173310bf
Total comments: 102
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+8656 lines, -827 lines) |
Patch |
 |
M |
mojo/dart/packages/mojo_services/BUILD.gn
|
View
|
1
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
mojo/dart/packages/mojo_services/lib/mojo/geometry.mojom.dart
|
View
|
1
2
|
21 chunks |
+106 lines, -97 lines |
0 comments
|
Download
|
 |
A |
mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/compositor.mojom.dart
|
View
|
|
1 chunk |
+472 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/hit_tests.mojom.dart
|
View
|
|
18 chunks |
+166 lines, -174 lines |
0 comments
|
Download
|
 |
A |
mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/nodes.mojom.dart
|
View
|
1
2
|
1 chunk |
+839 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/renderers.mojom.dart
|
View
|
|
12 chunks |
+102 lines, -96 lines |
0 comments
|
Download
|
 |
A |
mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/resources.mojom.dart
|
View
|
|
1 chunk |
+506 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/scene_token.mojom.dart
|
View
|
|
5 chunks |
+11 lines, -20 lines |
0 comments
|
Download
|
 |
A + |
mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/scenes.mojom.dart
|
View
|
|
33 chunks |
+386 lines, -421 lines |
0 comments
|
Download
|
 |
A |
mojo/dart/packages/mojo_services/lib/mojo/gfx/composition/scheduling.mojom.dart
|
View
|
|
1 chunk |
+442 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
mojo/services/gfx/composition/cpp/BUILD.gn
|
View
|
1
2
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gfx/composition/cpp/formatting.h
|
View
|
1
2
|
1 chunk |
+64 lines, -0 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gfx/composition/cpp/formatting.cc
|
View
|
1
2
|
1 chunk |
+184 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
mojo/services/gfx/composition/interfaces/BUILD.gn
|
View
|
|
1 chunk |
+10 lines, -7 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gfx/composition/interfaces/compositor.mojom
|
View
|
|
1 chunk |
+57 lines, -0 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gfx/composition/interfaces/hit_tests.mojom
|
View
|
1
2
|
1 chunk |
+49 lines, -0 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gfx/composition/interfaces/nodes.mojom
|
View
|
1
2
|
1 chunk |
+217 lines, -0 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gfx/composition/interfaces/renderers.mojom
|
View
|
|
1 chunk |
+38 lines, -0 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gfx/composition/interfaces/resources.mojom
|
View
|
|
1 chunk |
+62 lines, -0 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gfx/composition/interfaces/scene_token.mojom
|
View
|
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gfx/composition/interfaces/scenes.mojom
|
View
|
|
1 chunk |
+213 lines, -0 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gfx/composition/interfaces/scheduling.mojom
|
View
|
|
1 chunk |
+89 lines, -0 lines |
0 comments
|
Download
|
 |
M |
mojo/services/mojo_services.gni
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
services/BUILD.gn
|
View
|
1
2
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
services/gfx/BUILD.gn
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
A |
services/gfx/README.md
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/BUILD.gn
|
View
|
1
2
|
1 chunk |
+96 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
services/gfx/compositor/README.md
|
View
|
1
2
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/backend/gpu_output.h
|
View
|
1
2
|
1 chunk |
+92 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/backend/gpu_output.cc
|
View
|
1
2
|
1 chunk |
+109 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/backend/gpu_rasterizer.h
|
View
|
1
2
|
1 chunk |
+75 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/backend/gpu_rasterizer.cc
|
View
|
1
2
|
1 chunk |
+171 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/backend/output.h
|
View
|
1
2
|
1 chunk |
+40 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/backend/scheduler.h
|
View
|
1
2
|
1 chunk |
+89 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/backend/scheduler.cc
|
View
|
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/backend/vsync_scheduler.h
|
View
|
|
1 chunk |
+162 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/backend/vsync_scheduler.cc
|
View
|
1
2
3
|
1 chunk |
+273 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/backend/vsync_scheduler_unittest.cc
|
View
|
1
2
|
1 chunk |
+367 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/compositor_app.h
|
View
|
|
1 chunk |
+51 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/compositor_app.cc
|
View
|
|
1 chunk |
+50 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/compositor_engine.h
|
View
|
1
2
|
1 chunk |
+137 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/compositor_engine.cc
|
View
|
1
2
|
1 chunk |
+459 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/compositor_impl.h
|
View
|
|
1 chunk |
+39 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/compositor_impl.cc
|
View
|
|
1 chunk |
+32 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/graph/node_def.h
|
View
|
1
2
|
1 chunk |
+225 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/graph/node_def.cc
|
View
|
1
2
3
|
1 chunk |
+328 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/graph/resource_def.h
|
View
|
1
2
|
1 chunk |
+75 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/graph/resource_def.cc
|
View
|
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/graph/scene_def.h
|
View
|
|
1 chunk |
+171 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/graph/scene_def.cc
|
View
|
1
2
|
1 chunk |
+397 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/graph/snapshot.h
|
View
|
1
2
|
1 chunk |
+111 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/graph/snapshot.cc
|
View
|
1
2
|
1 chunk |
+67 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
services/gfx/compositor/main.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/render/render_frame.h
|
View
|
1
2
|
1 chunk |
+72 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/render/render_frame.cc
|
View
|
1
2
|
1 chunk |
+40 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/render/render_image.h
|
View
|
1
2
|
1 chunk |
+66 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/render/render_image.cc
|
View
|
1
2
|
1 chunk |
+74 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/render/render_layer.h
|
View
|
1
2
|
1 chunk |
+108 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/render/render_layer.cc
|
View
|
1
2
|
1 chunk |
+99 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/renderer_impl.h
|
View
|
|
1 chunk |
+54 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/renderer_impl.cc
|
View
|
|
1 chunk |
+41 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/renderer_state.h
|
View
|
1
2
|
1 chunk |
+99 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/renderer_state.cc
|
View
|
1
2
|
1 chunk |
+59 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/scene_impl.h
|
View
|
|
1 chunk |
+55 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/scene_impl.cc
|
View
|
1
2
|
1 chunk |
+51 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/scene_state.h
|
View
|
1
2
|
1 chunk |
+80 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gfx/compositor/scene_state.cc
|
View
|
|
1 chunk |
+38 lines, -0 lines |
0 comments
|
Download
|
Depends on Patchset:
Total messages: 16 (3 generated)
|