Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Impeller] Present Impeller contents in a transaction when there is a platform view #37809

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

zanderso
Copy link
Member

Fixes flutter/flutter#115664

I copied these lines from the Skia implementation and verified that it fixes the issue. Is there some way to write a test?

@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.

// When there are platform views in the scene, the drawable needs to be presented in the same
// transaction as the one created for platform views. When the drawable are being presented from
// the raster thread, there is no such transaction.
layer.presentsWithTransaction = [[NSThread currentThread] isMainThread];
Copy link
Member

Choose a reason for hiding this comment

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

In a separate patch perhaps, we should put this in the base implementation of the iOS surface shared by both Skia and Impeller. The models are identical.

Not sure re. testing. We could test that we present with transaction when not on the main thread. But that this is the fix for tearing, I wouldn't know how to test that.

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

Does it also fix flutter/flutter#109007? In the same example app, flutter/flutter#109007 was reproducible.

@zanderso
Copy link
Member Author

zanderso commented Nov 21, 2022

I suspect this does also fix flutter/flutter#109007, however for that issue, I'm not 100% sure what I'm looking for. I'd appreciate if someone more familiar with flutter/flutter#109007 could verify after this lands.

@zanderso zanderso merged commit 49db609 into flutter:main Nov 21, 2022
@zanderso zanderso deleted the try-ios-pfv-fix branch November 21, 2022 17:45
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 21, 2022
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 21, 2022
…115777)

* 09b82e0f0 Roll Dart SDK from c3f1b3642181 to 68291f382fb6 (7 revisions) (flutter/engine#37808)

* 49db6092a [Impeller] Present Impeller contents in a transaction when there is a platform view (flutter/engine#37809)

* 21ce09a77 Add optional offset parameter to ImageFilterLayer (flutter/engine#36863)

* cc0ad6690 Roll Skia from f7b5a76b6f35 to b5b35f8dc919 (5 revisions) (flutter/engine#37810)
shogohida pushed a commit to shogohida/flutter that referenced this pull request Dec 7, 2022
…lutter#115777)

* 09b82e0f0 Roll Dart SDK from c3f1b3642181 to 68291f382fb6 (7 revisions) (flutter/engine#37808)

* 49db6092a [Impeller] Present Impeller contents in a transaction when there is a platform view (flutter/engine#37809)

* 21ce09a77 Add optional offset parameter to ImageFilterLayer (flutter/engine#36863)

* cc0ad6690 Roll Skia from f7b5a76b6f35 to b5b35f8dc919 (5 revisions) (flutter/engine#37810)
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jan 19, 2023
…lutter#115777)

* 09b82e0f0 Roll Dart SDK from c3f1b3642181 to 68291f382fb6 (7 revisions) (flutter/engine#37808)

* 49db6092a [Impeller] Present Impeller contents in a transaction when there is a platform view (flutter/engine#37809)

* 21ce09a77 Add optional offset parameter to ImageFilterLayer (flutter/engine#36863)

* cc0ad6690 Roll Skia from f7b5a76b6f35 to b5b35f8dc919 (5 revisions) (flutter/engine#37810)
bdero added a commit to bdero/flutter-engine that referenced this pull request Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Impeller] WebView jumps around while scrolling into view
3 participants