Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Issue 1552963002: Initial checkin of the new Mozart compositor. (Closed)

Created:
4 years, 11 months ago by jeffbrown
Modified:
4 years, 10 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, darin (slow to review), gregsimon, mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org
Base URL:
git@github.com:domokit/mojo.git@moz-11
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : #

Total comments: 102

Patch Set 3 : apply review feedback #

Patch Set 4 : fix android build #

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:

Messages

Total messages: 16 (3 generated)
jeffbrown
4 years, 11 months ago (2015-12-31 11:19:51 UTC) #2
viettrungluu
May as well send comments/questions now. (Far from finished reviewing ... will continue working.) https://codereview.chromium.org/1552963002/diff/20001/services/gfx/compositor/README.md ...
4 years, 11 months ago (2016-01-04 21:08:24 UTC) #3
abarth
Brain experienced EOVERFLOW. Will continue review after TV. https://codereview.chromium.org/1552963002/diff/20001/mojo/services/gfx/composition/interfaces/hit_tests.mojom File mojo/services/gfx/composition/interfaces/hit_tests.mojom (right): https://codereview.chromium.org/1552963002/diff/20001/mojo/services/gfx/composition/interfaces/hit_tests.mojom#newcode39 mojo/services/gfx/composition/interfaces/hit_tests.mojom:39: array<Hit> ...
4 years, 11 months ago (2016-01-10 04:22:09 UTC) #4
abarth
https://codereview.chromium.org/1552963002/diff/20001/services/gfx/compositor/compositor_engine.cc File services/gfx/compositor/compositor_engine.cc (right): https://codereview.chromium.org/1552963002/diff/20001/services/gfx/compositor/compositor_engine.cc#newcode106 services/gfx/compositor/compositor_engine.cc:106: label.get().substr(0, mojo::gfx::composition::kLabelMaxLength); This pattern recurs a bunch. Maybe factor ...
4 years, 11 months ago (2016-01-10 22:55:37 UTC) #5
abarth
This patch is way too big to review. I'd recommend breaking it down into a ...
4 years, 11 months ago (2016-01-10 22:57:57 UTC) #6
jeffbrown
On 2016/01/10 22:57:57, abarth wrote: > This patch is way too big to review. I'd ...
4 years, 11 months ago (2016-01-10 23:55:22 UTC) #7
abarth
On 2016/01/10 at 23:55:22, jeffbrown wrote: > Yeah, it is a big patch but with ...
4 years, 11 months ago (2016-01-11 03:40:12 UTC) #8
jeffbrown
https://codereview.chromium.org/1552963002/diff/20001/mojo/services/gfx/composition/interfaces/hit_tests.mojom File mojo/services/gfx/composition/interfaces/hit_tests.mojom (right): https://codereview.chromium.org/1552963002/diff/20001/mojo/services/gfx/composition/interfaces/hit_tests.mojom#newcode39 mojo/services/gfx/composition/interfaces/hit_tests.mojom:39: array<Hit> hits; On 2016/01/10 04:22:08, abarth wrote: > I'm ...
4 years, 11 months ago (2016-01-16 03:28:33 UTC) #9
jeffbrown
https://codereview.chromium.org/1552963002/diff/20001/services/gfx/compositor/render/painting.h File services/gfx/compositor/render/painting.h (right): https://codereview.chromium.org/1552963002/diff/20001/services/gfx/compositor/render/painting.h#newcode91 services/gfx/compositor/render/painting.h:91: std::owner_less<std::weak_ptr<RenderImage>>> used_images_; On 2016/01/16 03:28:32, jeffbrown wrote: > On ...
4 years, 11 months ago (2016-01-16 03:43:40 UTC) #10
jeffbrown
apply review feedback
4 years, 11 months ago (2016-01-26 09:14:39 UTC) #11
abarth
LGTM We'll obviously need to continue working on this system, but this patch seems like ...
4 years, 11 months ago (2016-01-26 22:44:44 UTC) #12
jeffbrown
Committed patchset #4 (id:60001) manually as 751f4d3c32cbd11f0bfd44c5facf6c62173310bf (presubmit successful).
4 years, 11 months ago (2016-01-26 23:51:07 UTC) #14
mesch
4 years, 10 months ago (2016-01-29 03:01:16 UTC) #16
Message was sent while issue was closed.
Totally tangential drive by nitpick for the record. Feel free to ignore.

https://codereview.chromium.org/1552963002/diff/20001/services/gfx/compositor...
File services/gfx/compositor/compositor_app.h (right):

https://codereview.chromium.org/1552963002/diff/20001/services/gfx/compositor...
services/gfx/compositor/compositor_app.h:39: mojo::ApplicationImpl* app_impl_;
You can initialize this to nullptr inline if we speak C++11 here
<http://www.stroustrup.com/C++11FAQ.html#member-init>.

And then you don't need the default constructor anymore.

Powered by Google App Engine
This is Rietveld 408576698