[CP-stable][Impeller] Do not wait for a frame's acquire fence if the frame was never presented#183885
Conversation
…ever presented (flutter#183288) This could happen if a previous call to vkAcquireNextImageKHR failed. If that occurs, then AcquireNextDrawable will not return a surface. The caller will not render a frame or call Present, and the fence will never be signaled. See internal issue b/488786379
|
@reidbaker please fill out the PR description above, afterwards the release team will review this request. |
|
This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter. Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed. |
There was a problem hiding this comment.
Code Review
This pull request modifies the Vulkan swapchain implementation to avoid waiting on an acquisition fence if the frame was never presented. This is achieved by introducing a new flag, acquire_fence_pending, to track whether a fence wait is expected. The acquire fence is now created in an unsignaled state, and the acquire_fence_pending flag is set to true only when a frame is successfully submitted for presentation. The wait for the fence is skipped if this flag is not set, preventing a potential hang when acquiring the next drawable fails. The changes also include updates to the Vulkan mocking infrastructure to support a new unit test that validates this fix.
301b0e8
into
flutter:flutter-3.41-candidate.0
…ce if the frame was never presented (flutter/flutter#183885)
…ce if the frame was never presented (flutter/flutter#183885)
…ce if the frame was never presented (flutter/flutter#183885)
Merge CHANGELOG.md into master for 3.41.6 includes: flutter#183885 flutter#184040 flutter#184025
…frame was never presented (flutter#183885) This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? b/488786379 ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping of production apps (the app crashes on launch). This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick. ### Changelog Description: Explain this cherry pick: * In one line that is accessible to most Flutter developers. * That describes the state prior to the fix. * That includes which platforms are impacted. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples. < Replace with changelog description here > [flutter/183887](flutter#183887) During SCREEN_OFF event a deadlock preventing new frames causing an ANR can occur on android devices running the Android 16 March Security update. ### Workaround: Is there a workaround for this issue? No ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? No public repro steps.
…frame was never presented (flutter#183885) This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. What is the link to the issue this cherry-pick is addressing? b/488786379 What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping of production apps (the app crashes on launch). This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick. Explain this cherry pick: * In one line that is accessible to most Flutter developers. * That describes the state prior to the fix. * That includes which platforms are impacted. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples. < Replace with changelog description here > [flutter/183887](flutter#183887) During SCREEN_OFF event a deadlock preventing new frames causing an ANR can occur on android devices running the Android 16 March Security update. Is there a workaround for this issue? No What is the risk level of this cherry-pick? Are you confident that your fix is tested by automated tests? What are the steps to validate that this fix works? No public repro steps.
Update the changelog for 4.41.6. Includes: flutter#183885 flutter#184040 flutter#184025
This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
Issue Link:
What is the link to the issue this cherry-pick is addressing?
b/488786379
Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.
Changelog Description:
Explain this cherry pick:
See best practices for examples.
< Replace with changelog description here >
flutter/183887 During SCREEN_OFF event a deadlock preventing new frames causing an ANR can occur on android devices running the Android 16 March Security update.
Workaround:
Is there a workaround for this issue?
No
Risk:
What is the risk level of this cherry-pick?
Test Coverage:
Are you confident that your fix is tested by automated tests?
Validation Steps:
What are the steps to validate that this fix works?
No public repro steps.