-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] Prepare to add/remove views #51908
[Windows] Prepare to add/remove views #51908
Conversation
EXPECT_TRUE(compositor.Present(view()->view_id(), nullptr, 0)); | ||
} | ||
|
||
TEST_F(CompositorOpenGLTest, HeadlessPresentIgnored) { |
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 following tests were all replaced by WindowsTest.PresentHeadless
:
CompositorOpenGLTest.HeadlessPresentIgnored
CompositorOpenGLTest.UnknownViewIgnored
CompositorSoftwareTest.HeadlessPresentIgnored
CompositorSoftwareTest.UnknownViewIgnored
(Presenting to the implicit view while in headless mode is effectively the same thing as presenting to an unknown view)
@@ -315,9 +315,49 @@ void drawHelloWorld() { | |||
..addPicture(ui.Offset.zero, picture) | |||
..pop(); | |||
|
|||
ui.window.render(sceneBuilder.build()); | |||
ui.PlatformDispatcher.instance.implicitView?.render(sceneBuilder.build()); |
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 window
global is deprecated and replaced by PlatformDispatcher.instance.implicitView
. This isn't necessary for this PR, but removes a usage of a deprecated member :)
|
||
ViewControllerPtr controller{builder.Run()}; | ||
ASSERT_NE(controller, nullptr); | ||
auto& context = GetContext(); |
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 extra thread was unnecessary for this test. Consider reviewing this with whitespace changes disabled: https://github.com/flutter/engine/pull/51908/files?w=1#diff-f0b8369989e179cde8da71010c79f2c542f16c55f91e9d9aeae1a3fe769cf83dR548
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.
…146311) flutter/engine@dcc99d6...d44462a 2024-04-04 [email protected] [Windows] Prepare to add/remove views (flutter/engine#51908) 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://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
…lutter#146311) flutter/engine@dcc99d6...d44462a 2024-04-04 [email protected] [Windows] Prepare to add/remove views (flutter/engine#51908) 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://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
This is a refactoring with no semantic changes.
Prepare the Windows embedder to add/remove views. In a multi-view world, the platform thread can remove a view while the raster thread presenting to the same view. A lock will be introduced to ensure this does not happen. This shuffles the code around so that the engine can acquire the lock before the compositor presents to the view.
Prepares for flutter/flutter#138179
Part of flutter/flutter#142845
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.