-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Conversation
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]; |
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.
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.
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.
Does it also fix flutter/flutter#109007? In the same example app, flutter/flutter#109007 was reproducible.
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. |
…there is a platform view (flutter/engine#37809)
…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)
…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)
…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)
…ere is a platform view (flutter#37809)" This reverts commit 49db609.
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?