Repository navigation
improve modelity of multi finger move - #36948
winctoryang wants to merge 1 commit into
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. |
|
Yep, I'm working on this today. Thanks for the write up and sorry for the delay. |
|
Are we still working on this? This is a pretty fundamental change to touch processing and is iOS only to boot. We'd need to migrate all platforms including changing the semantics in the embedder API. I don't think we should attempt such a breaking change. |
|
I'd like to work on this but I'm a little busy recently. We've made a lengthy discussion but it seems there's no alternative for this batching information (unless we make even bigger changes). Without it we will not be able to properly calculate the scrolling distance. The problem is that, the scrolling distance on iOS when multiple touches are involved is
Calculating it requires getting "all touch events within a batch". However, currently the touch events are sent separately, and only the changing touches are sent. This means that there's no way to know when a new batch starts. Also I don't think it changes much in the embedder API. It will include all touches (instead of the changing touches) in the pointer packet, which isn't breaking, but makes stricter guarantees. |
|
Should we mark this as WIP till you have the bandwidth to pick this back up? |
|
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. |
|
Closing this as stale. Please reopen once progress can be made. |
@dkwingsmt @goderbauer
Sorry for the late comments.
This is about the issues : Improve fidelity of multi-pointer drag gestures and this.
In iOS, we can use

event.allTouchesto replacetouchesin the function:in FlutterViewControll.mm Line 1122.
If we do this, we can easly process the multi fingers' move not using endOfBatch (proposed in this). But the code of the flutter/engine need to modify firstly.
Why we need to modify
FML_DCHECKtoifstatement?When we use
event.allTouches, the events' phase may be different. For example, the p1 down and p2 down firstly, if p1 move now, sometimes the event.allTouches phases are "p1 move and p2 move" and sometimes they are "p1 move and p2 down"(two fingers down together and move fast together, maybe but not must appear, you need try some times). That means p2 down event will triger twice! ( I do not know why, maybe a bug in ios? ). Please refer to the stack trace below.Pay attention to the phase. 0 means down and 1 means move. And it happend to touchesEnd too. So I modify the
FML_DCHECKinPointerData::Change::kRemove,PointerData::Change::kDownandPointerData::Change::kUp.After this merged, I will open the Improve fidelity of multi-pointer drag gestures again.
What are your opions?