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

Conversation

@jonahwilliams
Copy link
Contributor

Testing with validation enabled shows no crashes or validation warnings on Pixel 6 or S10. I believe this is safe since we are correctly synchronized in the acquireNextImage via the presentation semaphore. The only loss is that we will finish the raster task before we know that presentation is failed.

Having said that, we can end up waiting multiple ms for the layout transition and presentation, so that doesn't seem worth it.

@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 (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

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

@jonahwilliams
Copy link
Contributor Author

The clang tidy lint doesn't seem correct but I could be misunderstanding it. I need to capture the shared ptr and not a reference to the shared ptr for the closure, otherwise when the task executes the stack allocated reference will ahve disappeared. Should I just add an ignore or am I missing something else?


const auto& context = ContextVK::Cast(*context_strong);
context.GetConcurrentWorkerTaskRunner()->PostTask(
[&, index, image, current_frame = current_frame_] {
Copy link
Contributor

Choose a reason for hiding this comment

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

The refcount on image will get bumped here. You can move the parameter back to a reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM once tidy is happy

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 24, 2023
@auto-submit auto-submit bot merged commit ceb2674 into flutter:main Jul 24, 2023
@jonahwilliams jonahwilliams deleted the present_from_background branch July 24, 2023 23:54
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 25, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 25, 2023
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 31, 2023
vashworth pushed a commit to vashworth/flutter that referenced this pull request Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants