-
Notifications
You must be signed in to change notification settings - Fork 6k
[Windows] Refactor logic when window resize completes #49872
[Windows] Refactor logic when window resize completes #49872
Conversation
@@ -329,7 +329,7 @@ bool AngleSurfaceManager::MakeResourceCurrent() { | |||
egl_resource_context_) == EGL_TRUE); | |||
} | |||
|
|||
EGLBoolean AngleSurfaceManager::SwapBuffers() { | |||
bool AngleSurfaceManager::SwapBuffers() { |
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.
What is the purpose of this change?
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.
Anytime we can avoid leaking implementation details (including types) from behind interfaces, it's a nice plus. Users of our surface managers shouldn't need to know about the underlying usage of GL types.
if (!engine_->surface_manager()->SwapBuffers()) { | ||
return false; | ||
} | ||
|
||
engine_->view()->OnFramePresented(); | ||
return true; |
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.
Should this be refactored into a separate function? It looks like this and the below addition to this file are identical.
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.
You are right that they're identical, but I think the logic is short enough that it's okay to repeat. I don't feel super strongly about this though, let me know if you do and I'd be happy to update this.
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.
Just a thought. I don't think it's too important either way.
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.
…141811) flutter/engine@9dded18...dde3ebf 2024-01-18 [email protected] [Windows] Refactor logic when window resize completes (flutter/engine#49872) 2024-01-18 [email protected] Roll Skia from 40200ceca00e to da3bfb25fb84 (1 revision) (flutter/engine#49873) 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
Time to revert pull request flutter/engine/49872 has elapsed. |
#49872 introduced a crash in debug mode if the platform thread starts a window resize in between `OnFrameGenerated` and `OnFramePresented`. Fixes flutter/flutter#141855. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Changes:
FlutterWindowsView
toCompositorOpenGL
FlutterWindowsView::SwapBuffers
toFlutterWindowsView::OnFramePresented
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.