-
Notifications
You must be signed in to change notification settings - Fork 6k
Multi-view Rasterizer #45512
Multi-view Rasterizer #45512
Conversation
…aster-status-rescope
dnfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No major concerns, mostly nits
| FramePipeline::Consumer consumer = [&draw_result, | ||
| this](std::unique_ptr<FrameItem> item) { | ||
| draw_result = DoDraw(std::move(item->frame_timings_recorder), | ||
| std::move(item->layer_tree_tasks)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something should probably clear out the tasks after this right?
Otherwise we have a list of tasks with nullptr...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tasks are moved all the way into DrawToSurfacesUnsafe, where some are discarded, some moved into resubmitted_tasks, and some stored in last_successful_tasks_. Since the vector is moved, there shouldn't be a list of nullptrs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I think I see now, this is the last spot they're used.
shell/common/rasterizer.cc
Outdated
| device_pixel_ratio); | ||
| } | ||
| } | ||
| // TODO(dkwingsmt): Pass in all raster caches |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File a bug.
What's not clear to me is whether we'd actually want multiple raster caches or just one raster cache per layer tree. There are also ongoing explorations to see if we can just remove the raster cache entirely as we migrate to Impeller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(@jonahwilliams fyi)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think its possible for the rasterizer to know if it is safe to share any of this information. i.e. if these are from different windows with a different GlContext, or the different windows with the same GlContext, et cetera. The backends are not designed to handle this.
|
@loic-sharma @dnfield I should have addressed all review comments. Here are the non-trivial changes since the last review:
Can you take another look? |
dnfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flutter/engine@48973d7...d203e34 2023-09-29 [email protected] Multi-view Rasterizer (flutter/engine#45512) 2023-09-29 [email protected] Roll Dart SDK from 955a3a964621 to 0931bb8a43c8 (1 revision) (flutter/engine#46423) 2023-09-29 [email protected] [Impeller] Redo simplify invert colors. (flutter/engine#46416) 2023-09-29 [email protected] Use `dart:_wasm` constructs to avoid dependence on `WebAssembly.Function` (flutter/engine#46388) 2023-09-29 [email protected] Roll Skia from 2d4045f55fd5 to a063eaeaf1e0 (6 revisions) (flutter/engine#46420) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…5776) flutter/engine@48973d7...d203e34 2023-09-29 [email protected] Multi-view Rasterizer (flutter/engine#45512) 2023-09-29 [email protected] Roll Dart SDK from 955a3a964621 to 0931bb8a43c8 (1 revision) (flutter/engine#46423) 2023-09-29 [email protected] [Impeller] Redo simplify invert colors. (flutter/engine#46416) 2023-09-29 [email protected] Use `dart:_wasm` constructs to avoid dependence on `WebAssembly.Function` (flutter/engine#46388) 2023-09-29 [email protected] Roll Skia from 2d4045f55fd5 to a063eaeaf1e0 (6 revisions) (flutter/engine#46420) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR refactors `Rasterizer` so that it's more suitable for multi-view. Design doc: [flutter.dev/go/multi-view-pipeline-and-rasterizer](http://flutter.dev/go/multi-view-pipeline-and-rasterizer) With this change, `Rasterizer::DrawToSurfaces` has a structure that can handle drawing to multiple views, although the lack of some functionality still blocks it, mostly related to `ExternalViewEmbedder` and `RasterCache`. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This PR refactors
Rasterizerso that it's more suitable for multi-view.Design doc: flutter.dev/go/multi-view-pipeline-and-rasterizer
With this change,
Rasterizer::DrawToSurfaceshas a structure that can handle drawing to multiple views, although the lack of some functionality still blocks it, mostly related toExternalViewEmbedderandRasterCache.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.