Have pinch locking consider more than just the one most recent pinch gesture event
Categories
(Core :: Panning and Zooming, enhancement, P3)
Tracking
()
People
(Reporter: botond, Assigned: jlogandavison, Mentored)
References
Details
(Whiteboard: [gfx-noted] [lang=c++])
Attachments
(2 files, 11 obsolete files)
|
11.15 KB,
patch
|
Details | Diff | Splinter Review | |
|
14.99 KB,
patch
|
Details | Diff | Splinter Review |
| Reporter | ||
Updated•7 years ago
|
| Reporter | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
| Assignee | ||
Comment 3•7 years ago
|
||
| Reporter | ||
Comment 4•7 years ago
|
||
| Reporter | ||
Comment 5•7 years ago
|
||
| Assignee | ||
Comment 6•7 years ago
|
||
| Reporter | ||
Comment 7•7 years ago
|
||
| Assignee | ||
Comment 8•7 years ago
|
||
| Reporter | ||
Comment 9•7 years ago
|
||
| Reporter | ||
Comment 10•7 years ago
|
||
| Reporter | ||
Updated•7 years ago
|
| Reporter | ||
Comment 11•7 years ago
|
||
| Reporter | ||
Comment 12•7 years ago
|
||
| Assignee | ||
Comment 13•7 years ago
|
||
| Assignee | ||
Comment 14•7 years ago
|
||
| Reporter | ||
Comment 15•7 years ago
|
||
| Reporter | ||
Comment 16•7 years ago
|
||
| Reporter | ||
Comment 17•7 years ago
|
||
| Reporter | ||
Comment 18•7 years ago
|
||
| Reporter | ||
Comment 19•7 years ago
|
||
| Assignee | ||
Comment 20•7 years ago
|
||
| Reporter | ||
Comment 21•7 years ago
|
||
| Reporter | ||
Comment 22•7 years ago
|
||
| Reporter | ||
Comment 23•7 years ago
|
||
| Reporter | ||
Comment 24•7 years ago
|
||
| Assignee | ||
Comment 25•7 years ago
|
||
| Reporter | ||
Comment 26•7 years ago
|
||
| Reporter | ||
Comment 27•7 years ago
|
||
| Reporter | ||
Comment 29•6 years ago
|
||
I'm going to return this bug to the pool of mentored bugs available for others to pick up.
jlogandavison, if you'd like to continue working on this after all, feel free to say so!
| Assignee | ||
Comment 30•6 years ago
|
||
Apologies for the long absence. I'm still around.
I've rebased my current patch onto a more recent changeset. It seems that the APZC code has been linted since I last touched it. Should I be running a linter on my changes too?
| Assignee | ||
Comment 31•6 years ago
|
||
And this patch fixes the failing test in TestPinching.cpp.
It was simply a case of properly simulating the progress of time with mcc-AdvanceBy() and events with properly initialised mTimeStamp attributes.
I'll squash this in once we're happy with it.
| Reporter | ||
Updated•6 years ago
|
| Reporter | ||
Updated•6 years ago
|
| Reporter | ||
Comment 32•6 years ago
|
||
| Reporter | ||
Comment 33•6 years ago
|
||
(In reply to jlogandavison from comment #30)
It seems that the APZC code has been linted since I last touched it.
The entire codebase was formatted with clang-format.
Should I be running a linter on my changes too?
If you could run mach clang-format, that would be helpful. You may need to re-run mach bootstrap to install the clang-format binary.
| Assignee | ||
Comment 34•6 years ago
|
||
| Assignee | ||
Comment 35•6 years ago
|
||
| Assignee | ||
Comment 36•6 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #33)
I've attached clang-formatted versions of the patches.
(In reply to Botond Ballo [:botond] from comment #32)
Seems there is still a failure relating to this:
Assertion failure: !IsNull() (Cannot compute with a null value), at /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/TimeStamp.h:525
The failing test is APZCBasicTester.Overzoom which does indeed make use of the CreatePinchGestureInput utility with the default null timestamp.
We have other tests using null timestamped events, should we prefer to "fix" these tests, or include some form of null check in the RecentEventsBuffer code?
| Reporter | ||
Comment 37•6 years ago
|
||
I would prefer that we fix the tests. In fact, I would make the timestamp parameter to CreatePinchGestureInput() required. There are only a handful of other call sites.
| Assignee | ||
Comment 38•6 years ago
|
||
So this became a bit of a chunky change. Similar to bug 1355656, I've migrated PinchWithPinchInput into APZCTesterBase. This is so that it has access to the mcc member.
So PinchWithPinchInput now passes mcc-Time() to CreatePinchGestureInput and also uses mcc->AdvanceBy(50) between events.
Plus a few calls in TestPinching.cpp, this covers all the call sites of CreatePinchGestureInput.
| Reporter | ||
Comment 39•6 years ago
|
||
| Reporter | ||
Comment 40•6 years ago
•
|
||
The patch needs rebasing across bug 1515774.
| Assignee | ||
Comment 41•6 years ago
|
||
Rebased
| Assignee | ||
Comment 42•6 years ago
|
||
Rebased. Changes to CreatePinchGestureInput incorporated.
| Reporter | ||
Comment 43•6 years ago
|
||
| Reporter | ||
Comment 44•6 years ago
|
||
Looks like APZCGestureDetectorTester.Pan_After_Pinch is still failing with an assertion in debug builds.
| Reporter | ||
Comment 45•6 years ago
|
||
The backtrace in the Treeherder log is not symbolicated, but I got one from a local run:
#0 mozilla::layers::RecentEventsBuffer<mozilla::PinchGestureInput>::push (this=0x7fffdfa89600, event=...)
at /home/botond/dev/projects/mozilla/sabaton/gfx/layers/apz/src/RecentEventsBuffer.h:66
#1 0x00007fffe7f87e7a in mozilla::layers::AsyncPanZoomController::OnScaleBegin (this=<optimized out>, aEvent=...)
at /home/botond/dev/projects/mozilla/sabaton/gfx/layers/apz/src/AsyncPanZoomController.cpp:1526
#2 0x00007fffe7f874c8 in mozilla::layers::AsyncPanZoomController::HandleGestureEvent (this=0x7fffdfa89000, aEvent=...)
at /home/botond/dev/projects/mozilla/sabaton/gfx/layers/apz/src/AsyncPanZoomController.cpp:1210
#3 0x00007fffe7f96ee0 in mozilla::layers::GestureEventListener::HandleInputTouchMove (this=0x7fffdfae3820)
at /home/botond/dev/projects/mozilla/sabaton/gfx/layers/apz/src/GestureEventListener.cpp:349
#4 0x00007fffe7f85278 in mozilla::layers::AsyncPanZoomController::HandleInputEvent (this=0x7fffdfa89000, aEvent=..., aTransformToApzc=...)
at /home/botond/dev/projects/mozilla/sabaton/gfx/layers/apz/src/AsyncPanZoomController.cpp:1094
#5 0x00007fffe7fb5c7e in mozilla::layers::InputQueue::ProcessQueue (this=0x7fffdfaaaba0)
at /home/botond/dev/projects/mozilla/sabaton/gfx/layers/apz/src/InputQueue.cpp:746
#6 0x00007fffe7fb4c4b in mozilla::layers::InputQueue::ReceiveTouchInput (this=<optimized out>, aTarget=..., aFlags=..., aEvent=..., aOutInputBlockId=0x12c00000002)
at /home/botond/dev/projects/mozilla/sabaton/gfx/layers/apz/src/InputQueue.cpp:164
#7 0x00007fffe7fb4699 in mozilla::layers::InputQueue::ReceiveInputEvent (this=0x7fffdfaaaba0, aTarget=..., aFlags=..., aEvent=..., aOutInputBlockId=0x0)
at /home/botond/dev/projects/mozilla/sabaton/gfx/layers/apz/src/InputQueue.cpp:38
#8 0x00007fffeb4d10b0 in TestAsyncPanZoomController::ReceiveInputEvent (this=0x7fffdfa89000, aEvent=..., aOutInputBlockId=0x0)
at /home/botond/dev/projects/mozilla/sabaton/gfx/layers/apz/test/gtest/APZTestCommon.h:254
#9 APZCGestureDetectorTester_Pan_After_Pinch_Test::TestBody (this=0x7fffde5213c0)
at /home/botond/dev/projects/mozilla/sabaton/gfx/layers/apz/test/gtest/TestGestureDetector.cpp:64
This is the codepath where a gesture event is synthesized from touch. Should be easy to fix by using non-zero timestamps in the Pan_After_Pinch testcase.
| Reporter | ||
Comment 46•6 years ago
|
||
By the way, you can run the APZ gtests in debug mode locally by doing a debug build (add ac_add_options --enable-debug to your .mozconfig) and running ./mach gtest 'APZ*'.
| Assignee | ||
Comment 47•6 years ago
|
||
Rebased onto fd67a4332060
| Assignee | ||
Comment 48•6 years ago
|
||
Rebased also. Includes further fixes.
Thank you Botond for surfacing the backtrace for me. It seems my local build didn't have debug flags enabled. Not sure how that happened, so my apologies for that.
For clarity, the adjusted tests are:
TestGestureDetector.cpp
Pan_After_Pinch
TestPinching.cpp
Pinch_NoSpanPinch_TwoFinger_APZZoom_Disabled_Bug1354185- Methods in the
APZCPinchLockingTesterclass
This is on top of the modifications to PinchWithPinchInput (now found in APZTestCommon.h)
| Reporter | ||
Comment 49•6 years ago
|
||
Thanks for the update! New Try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b98426adbf361f2f04ad158f69aed02ebedad2e3
| Reporter | ||
Comment 50•6 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #49)
New Try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b98426adbf361f2f04ad158f69aed02ebedad2e3
Whoops, hg import managed to commit a version control conflict marker...
There doesn't seem to be an actual conflict though. Let's try that again:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=17041f9f494133b40008fbddb39420e7feebe4a3
| Reporter | ||
Comment 51•6 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #50)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=17041f9f494133b40008fbddb39420e7feebe4a3
That's looking good! I'll go ahead and fold the two patches and land the result.
Comment 52•6 years ago
|
||
Comment 53•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
| Reporter | ||
Comment 54•6 years ago
|
||
Looks like we're all done here :)
Thanks for your contribution and your patience in seeing it through to the end!
| Assignee | ||
Comment 55•6 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #54)
Thanks for your contribution and your patience in seeing it through to the end!
Awesome! And thanks to you too for helping to get this landed.
Updated•6 years ago
|
Description
•