This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Multiview backing store #51722
Merged
Merged
Multiview backing store #51722
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loic-sharma
reviewed
Apr 3, 2024
loic-sharma
reviewed
Apr 3, 2024
loic-sharma
reviewed
Apr 4, 2024
| const std::shared_ptr<impeller::AiksContext>& aiks_context, | ||
| std::unique_ptr<SurfaceFrame> frame) { | ||
| // Get the view's cache, or create one if the view doesn't have a cache yet. | ||
| EmbedderRenderTargetCache& render_target_cache = |
Member
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.
Could you add a comment on EmbedderRenderTargetCache's class declaration that it is view-specific?
loic-sharma
approved these changes
Apr 4, 2024
Member
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.
This LGTM but please also get a review from engine folks too :)
Member
|
/cc @knopp |
chinmaygarde
approved these changes
Apr 4, 2024
cbracken
approved these changes
Apr 4, 2024
Member
cbracken
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.
5 tasks
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 4, 2024
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Apr 4, 2024
flutter/engine@e3104af...dcc99d6 2024-04-04 dkwingsmt@users.noreply.github.com Multiview backing store (flutter/engine#51722) 2024-04-04 skia-flutter-autoroll@skia.org Roll Skia from f9dfb0308594 to 8ad03dfe4e2e (2 revisions) (flutter/engine#51915) 2024-04-04 43091780+utzcoz@users.noreply.github.com Bump Robolectric to 4.12.1 (flutter/engine#51800) 2024-04-04 johnoneil@users.noreply.github.com #145421 Fix glyph padding in STB atlas impl. (flutter/engine#51585) 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 matanl@google.com,rmistry@google.com,zra@google.com 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gilnobrega
pushed a commit
to gilnobrega/flutter
that referenced
this pull request
Apr 22, 2024
…6308) flutter/engine@e3104af...dcc99d6 2024-04-04 dkwingsmt@users.noreply.github.com Multiview backing store (flutter/engine#51722) 2024-04-04 skia-flutter-autoroll@skia.org Roll Skia from f9dfb0308594 to 8ad03dfe4e2e (2 revisions) (flutter/engine#51915) 2024-04-04 43091780+utzcoz@users.noreply.github.com Bump Robolectric to 4.12.1 (flutter/engine#51800) 2024-04-04 johnoneil@users.noreply.github.com flutter#145421 Fix glyph padding in STB atlas impl. (flutter/engine#51585) 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 matanl@google.com,rmistry@google.com,zra@google.com 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
autosubmit
Merge PR when tree becomes green via auto submit App
platform-android
platform-fuchsia
platform-ios
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this PR, backing stores are labeled with view IDs. When the engine requests the embedder to create a backing store, the engine will promise that it will only be used for a specific view.
This follows the design doc http://flutter.dev/go/backing-stores-for-multi-view-partial-repaint, so that backing stores can be used as a front surface that retains its content last frame.
The engine will create a render target cache for each view to cache backing stores separately.
Alternative design
The separate render target cache for each view is not needed to implement the design doc, since all usages described in the design doc avoids the engine cache. Instead, we can make the engine still only manage one render target cache for all views, and backing stores in it are interchangeable across views. We might describe the behavior in this way:
But it's really hard to explain the mechanism and the result is really confusing (as can be seen from my attempt). Why is there a view ID but it's not used, and if you enable the engine cache it's not even followed?
That's why I chose the current approach. Feel free to suggest otherwise for this.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.