Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@clarkezone
Copy link

Description

This change fixes flutter/flutter#40068. The root cause of the issue was a race condition in resize and release mode startup scenarios where frame rendering operations were getting stomped on by automatic DirectX swapchain resize happening in the Angle layer.

This change disables automatic swapchain resizing in Angle and instead performs an explicit resize operation before the engine is told about size changes thus guaranteeing that the race condition isn't possible anymore.

The change fixes a related secondary issue uncovered in the ordering of rendering initialization in startup on Windows contributing to flutter/flutter#63299. An additional fix for the latter will be submitted to flutter/flutter once this change has landed.

Related Issues

flutter/flutter#63299

Tests

I added the following tests:

No behavior changed in this PR

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the contributor guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the C++, Objective-C, Java style guides for the engine.
  • I read the tree hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation.
  • All existing and new tests are passing.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read handling breaking changes.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks for tracking this down and fixing it :)

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version doesn't build; see CI errors.

@clarkezone
Copy link
Author

Before i address final comment, confirming that the fix still works as expected with ToT

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I think you'll need to merge master again when it's green; it looks like you picked up a Linux error from the last merge.

@clarkezone clarkezone added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Aug 19, 2020
@clarkezone clarkezone merged commit 89f506e into flutter:master Aug 19, 2020
@clarkezone clarkezone deleted the fixredraw branch August 19, 2020 23:19
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 20, 2020
gspencergoog pushed a commit to gspencergoog/engine that referenced this pull request Aug 20, 2020
…s and startup in release (flutter#20357)

* Fix redraw issues

* Address CR feedback.

* Fix build

* CR feedback
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redraw issues on resize/minimize/maximize on Windows

3 participants