Cr48Filter: Persistent tracking id for existing fingers

When a second finger is added the Cr48 filter assumed that the existing
finger will stay in the same slot. This is not the case anymore.
The new logic compares the distance of both fingers to previously
existing finger and copies over the tracking id to the closest one.
This way fingers don't get mixed up which caused cursor or scroll jumps.

BUG=chromium:249491
TEST=mario2/click_jumpy_cursor
there was a regression reported in
mario/base_scroll_regardless_of_previous_state. However the new behavior
is an improvment, as the old behavior had a horizontal scroll jump due
to mixed up fingers. The new behavior shows a slight cursor movement
before the scroll.

Change-Id: I68696abeed29d8c3334bbf649a6a65c9a7bec949
Reviewed-on: https://gerrit.chromium.org/gerrit/58688
Commit-Queue: Dennis Kempin <[email protected]>
Reviewed-by: Dennis Kempin <[email protected]>
Tested-by: Dennis Kempin <[email protected]>
1 file changed