Skip to content

Commit 35dfc27

Browse files
authored
Do not call CoreWindow::Visible from raster thread (flutter#27760)
1 parent 51764ef commit 35dfc27

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

shell/platform/windows/flutter_window_winuwp.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,13 @@ float FlutterWindowWinUWP::GetDpiScale() {
118118
}
119119

120120
bool FlutterWindowWinUWP::IsVisible() {
121-
return window_.Visible();
121+
// This is called from raster thread as an optimization to not wait for vsync
122+
// if window is invisible. However CoreWindow is not agile so we can't call
123+
// Visible() from raster thread. For now assume window is always visible.
124+
// Possible solution would be to register a VisibilityChanged handler and
125+
// store the visiblity state in a variable. TODO(knopp)
126+
// https://github.com/flutter/flutter/issues/87870
127+
return true;
122128
}
123129

124130
void FlutterWindowWinUWP::OnDpiChanged(

0 commit comments

Comments
 (0)