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
[Windows] Improve logic to update swap intervals #46172
Merged
auto-submit
merged 2 commits into
flutter:main
from
loic-sharma:reland_windows_vsync_fixes
Sep 27, 2023
Merged
[Windows] Improve logic to update swap intervals #46172
auto-submit
merged 2 commits into
flutter:main
from
loic-sharma:reland_windows_vsync_fixes
Sep 27, 2023
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
commented
Sep 22, 2023
yaakovschectman
approved these changes
Sep 25, 2023
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
cbracken
approved these changes
Sep 26, 2023
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 with one suggestion -- thanks for getting to the bottom of this!
auto label is removed for flutter/engine/46172, due to - The status or check suite Linux linux_web_engine has failed. Please fix the issues identified (or deflake) before re-applying this label. |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Sep 27, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Sep 28, 2023
zanderso
pushed a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Sep 28, 2023
zanderso
pushed a commit
to flutter/flutter
that referenced
this pull request
Sep 28, 2023
…sions) (#135637) Manual roll Flutter Engine from f70f65f7a622 to be32dcc9117a (31 revisions) Manual roll requested by [email protected] Cannot build log URL because revision "be32dcc9117a" is invalid: Luci builds of "Linux linux_unopt" for be32dcc9117a462760cb52c18d0d050f067f2463 was STARTED 2023-09-28 [email protected] Rollback Dart SDK to 3.2.0-119. (flutter/engine#46339) 2023-09-28 [email protected] [canvaskit] Do not double-apply ImageFilter transform to children (flutter/engine#46336) 2023-09-28 [email protected] Reland "Reverts "[ios] Fix app extension not able to find assets from… (flutter/engine#46329) 2023-09-27 [email protected] Revert "[Impeller] Fixes stroke path geometry that can draw outside o… (flutter/engine#46334) 2023-09-27 [email protected] Roll Fuchsia Mac SDK from jQHACBU4Fi2wMElkm... to U334SygIkffMJVmdu... (flutter/engine#46333) 2023-09-27 [email protected] Roll Skia from 952e8dd66560 to b048b468d641 (1 revision) (flutter/engine#46332) 2023-09-27 [email protected] [Impeller] Destroy all per-thread command pools tied to a context before deleting the context (flutter/engine#46286) 2023-09-27 [email protected] Roll Skia from d78aba2524b3 to 952e8dd66560 (1 revision) (flutter/engine#46331) 2023-09-27 [email protected] [Impeller] Match Skia gradient clamping behavior (and document). (flutter/engine#44825) 2023-09-27 [email protected] Roll Dart SDK from 97647bb1666b to 80a965ee48ab (1 revision) (flutter/engine#46330) 2023-09-27 [email protected] Roll Skia from ff5474eed6b4 to d78aba2524b3 (3 revisions) (flutter/engine#46327) 2023-09-27 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[ios] Fix app extension not able to find assets from unloaded bundle" (flutter/engine#46328) 2023-09-27 [email protected] [Windows] Improve logic to update swap intervals (flutter/engine#46172) 2023-09-27 [email protected] [Impeller] Fallback to no index buffer when tesselation count is large, split up nonZero contours. (flutter/engine#46282) 2023-09-27 [email protected] Roll Skia from 4731ccd6342c to ff5474eed6b4 (1 revision) (flutter/engine#46325) 2023-09-27 [email protected] Declare native wrapper classes in Fuchsia packages as base classes (flutter/engine#46305) 2023-09-27 [email protected] Remove fuchsia from recipes cq. (flutter/engine#46324) 2023-09-27 [email protected] Roll Dart SDK from c2a455113e39 to 97647bb1666b (1 revision) (flutter/engine#46323) 2023-09-27 [email protected] [macOS] Synchronise modifiers from mouse events for RawKeyboard (flutter/engine#46230) 2023-09-27 [email protected] Roll Fuchsia Linux SDK from Lg6FR6iDnZeV6y-E8... to 6Y22MutFhgL7ua18F... (flutter/engine#46322) 2023-09-27 [email protected] Roll Skia from 2991bb799d3f to 4731ccd6342c (1 revision) (flutter/engine#46321) 2023-09-27 [email protected] Declare native wrapper classes in the GPU package as base classes (flutter/engine#46304) 2023-09-27 [email protected] Do not call DrawTextBlob for performance overlay text when using Impeller (flutter/engine#46307) 2023-09-27 [email protected] Update to use GrDirectContexts::MakeGL (flutter/engine#46308) 2023-09-27 [email protected] Roll Skia from 0f4f31127ac5 to 2991bb799d3f (1 revision) (flutter/engine#46319) 2023-09-27 [email protected] Roll Skia from fc629215398f to 0f4f31127ac5 (1 revision) (flutter/engine#46318) 2023-09-27 [email protected] Roll Dart SDK from 6c4eb86ecd25 to c2a455113e39 (1 revision) (flutter/engine#46317) 2023-09-27 [email protected] Roll Fuchsia Mac SDK from OMrTgAfDg9PKXTzq0... to jQHACBU4Fi2wMElkm... (flutter/engine#46314) 2023-09-27 [email protected] Roll Skia from 960325c13009 to fc629215398f (1 revision) (flutter/engine#46313) 2023-09-27 [email protected] Roll Skia from 76aecbaea259 to 960325c13009 (2 revisions) (flutter/engine#46311) 2023-09-27 [email protected] Roll Dart SDK from 7c3588c05f87 to 6c4eb86ecd25 (3 revisions) (flutter/engine#46310) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from Lg6FR6iDnZeV to 6Y22MutFhgL7 fuchsia/sdk/core/mac-amd64 from OMrTgAfDg9PK to U334SygIkffM 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 ...
Mairramer
pushed a commit
to Mairramer/flutter
that referenced
this pull request
Oct 10, 2023
…sions) (flutter#135637) Manual roll Flutter Engine from f70f65f7a622 to be32dcc9117a (31 revisions) Manual roll requested by [email protected] Cannot build log URL because revision "be32dcc9117a" is invalid: Luci builds of "Linux linux_unopt" for be32dcc9117a462760cb52c18d0d050f067f2463 was STARTED 2023-09-28 [email protected] Rollback Dart SDK to 3.2.0-119. (flutter/engine#46339) 2023-09-28 [email protected] [canvaskit] Do not double-apply ImageFilter transform to children (flutter/engine#46336) 2023-09-28 [email protected] Reland "Reverts "[ios] Fix app extension not able to find assets from… (flutter/engine#46329) 2023-09-27 [email protected] Revert "[Impeller] Fixes stroke path geometry that can draw outside o… (flutter/engine#46334) 2023-09-27 [email protected] Roll Fuchsia Mac SDK from jQHACBU4Fi2wMElkm... to U334SygIkffMJVmdu... (flutter/engine#46333) 2023-09-27 [email protected] Roll Skia from 952e8dd66560 to b048b468d641 (1 revision) (flutter/engine#46332) 2023-09-27 [email protected] [Impeller] Destroy all per-thread command pools tied to a context before deleting the context (flutter/engine#46286) 2023-09-27 [email protected] Roll Skia from d78aba2524b3 to 952e8dd66560 (1 revision) (flutter/engine#46331) 2023-09-27 [email protected] [Impeller] Match Skia gradient clamping behavior (and document). (flutter/engine#44825) 2023-09-27 [email protected] Roll Dart SDK from 97647bb1666b to 80a965ee48ab (1 revision) (flutter/engine#46330) 2023-09-27 [email protected] Roll Skia from ff5474eed6b4 to d78aba2524b3 (3 revisions) (flutter/engine#46327) 2023-09-27 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[ios] Fix app extension not able to find assets from unloaded bundle" (flutter/engine#46328) 2023-09-27 [email protected] [Windows] Improve logic to update swap intervals (flutter/engine#46172) 2023-09-27 [email protected] [Impeller] Fallback to no index buffer when tesselation count is large, split up nonZero contours. (flutter/engine#46282) 2023-09-27 [email protected] Roll Skia from 4731ccd6342c to ff5474eed6b4 (1 revision) (flutter/engine#46325) 2023-09-27 [email protected] Declare native wrapper classes in Fuchsia packages as base classes (flutter/engine#46305) 2023-09-27 [email protected] Remove fuchsia from recipes cq. (flutter/engine#46324) 2023-09-27 [email protected] Roll Dart SDK from c2a455113e39 to 97647bb1666b (1 revision) (flutter/engine#46323) 2023-09-27 [email protected] [macOS] Synchronise modifiers from mouse events for RawKeyboard (flutter/engine#46230) 2023-09-27 [email protected] Roll Fuchsia Linux SDK from Lg6FR6iDnZeV6y-E8... to 6Y22MutFhgL7ua18F... (flutter/engine#46322) 2023-09-27 [email protected] Roll Skia from 2991bb799d3f to 4731ccd6342c (1 revision) (flutter/engine#46321) 2023-09-27 [email protected] Declare native wrapper classes in the GPU package as base classes (flutter/engine#46304) 2023-09-27 [email protected] Do not call DrawTextBlob for performance overlay text when using Impeller (flutter/engine#46307) 2023-09-27 [email protected] Update to use GrDirectContexts::MakeGL (flutter/engine#46308) 2023-09-27 [email protected] Roll Skia from 0f4f31127ac5 to 2991bb799d3f (1 revision) (flutter/engine#46319) 2023-09-27 [email protected] Roll Skia from fc629215398f to 0f4f31127ac5 (1 revision) (flutter/engine#46318) 2023-09-27 [email protected] Roll Dart SDK from 6c4eb86ecd25 to c2a455113e39 (1 revision) (flutter/engine#46317) 2023-09-27 [email protected] Roll Fuchsia Mac SDK from OMrTgAfDg9PKXTzq0... to jQHACBU4Fi2wMElkm... (flutter/engine#46314) 2023-09-27 [email protected] Roll Skia from 960325c13009 to fc629215398f (1 revision) (flutter/engine#46313) 2023-09-27 [email protected] Roll Skia from 76aecbaea259 to 960325c13009 (2 revisions) (flutter/engine#46311) 2023-09-27 [email protected] Roll Dart SDK from 7c3588c05f87 to 6c4eb86ecd25 (3 revisions) (flutter/engine#46310) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from Lg6FR6iDnZeV to 6Y22MutFhgL7 fuchsia/sdk/core/mac-amd64 from OMrTgAfDg9PK to U334SygIkffM 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 ...
harryterkelsen
pushed a commit
that referenced
this pull request
Oct 23, 2023
This relands #45310 to unblock the ANGLE roll with the fix for flutter/flutter#134262. ## Background ### Swap interval If the Windows system compositor is enabled, the Windows embedder disables the swap interval so that presenting to a surface does not block until the v-blank. If the Windows system compositor is disabled (which is possible on Windows 7), the Windows embedder enables swap interval to prevent screen tearing. ### GL context threading Our current version of ANGLE allows making a GL context current on multiple threads. However, the latest version of ANGLE errors if a GL context is made current on multiple threads. This is causing the ANGLE roll to fail ([example](https://ci.chromium.org/ui/p/flutter/builders/try/Windows%20Engine%20Drone/203788/overview)). The Windows embedder has two GL context threading issues: 1. At startup, the platform thread creates and binds the GL context. This change ensures the GL context is released from the platform thread so that the raster thread can use the GL context for rendering. 2. When the system compositor updates, the GL context is bound to the platform thread to update the swap interval. This change ensures the swap interval update happens on the raster thread. ### Window resizing Resizing the window recreates the GL surface and resets the swap interval. The previous fix released the current GL context after updating the swap interval (this ensured the platform thread released the GL context at startup). This broke window resizing as it caused the engine to "lose" its GL context during rendering (see flutter/flutter#134262). This reland releases the GL context only if on the startup case. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
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.
This relands #45310 to unblock the ANGLE roll with the fix for flutter/flutter#134262.
Background
Swap interval
If the Windows system compositor is enabled, the Windows embedder disables the swap interval so that presenting to a surface does not block until the v-blank. If the Windows system compositor is disabled (which is possible on Windows 7), the Windows embedder enables swap interval to prevent screen tearing.
GL context threading
Our current version of ANGLE allows making a GL context current on multiple threads. However, the latest version of ANGLE errors if a GL context is made current on multiple threads. This is causing the ANGLE roll to fail (example).
The Windows embedder has two GL context threading issues:
Window resizing
Resizing the window recreates the GL surface and resets the swap interval.
The previous fix released the current GL context after updating the swap interval (this ensured the platform thread released the GL context at startup). This broke window resizing as it caused the engine to "lose" its GL context during rendering (see flutter/flutter#134262). This reland releases the GL context only if on the startup case.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.