-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
@jfirebaugh I noticed that too and debugging lead me to believe that canceling work tasks was the culprit; in particular it sometimes took over 1 second to cancel a work task. |
I'm not sure that's it. I rebased #3724 and it didn't seem to help. Logs say:
|
Zooming in glfw-app (with #4666 applied) is silky smooth. |
Issue was that the view object was eating many low-delta scroll events, interpreting them as touch events instead. |
@jfirebaugh will merge as soon as you give the go-ahead that this fixes your issues. |
@kkaefer It's a definite improvement, but still lacking the smoothness and fluidity of glfw-app. If you compare them side-by-side, the difference is striking: with glfw-app, you feel like you're directly manipulating the map surface. With osxapp, input is noticeably delayed and janky. |
@@ -375,7 +375,6 @@ - (void)installAttributionView { | |||
|
|||
/// Adds gesture recognizers for manipulating the viewport and selecting annotations. | |||
- (void)installGestureRecognizers { | |||
self.acceptsTouchEvents = YES; |
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.
This breaks touch events, right? Even if we conditionalize it on MGLScrollWheelZoomsMapViewDefaultKey
, gestures like rotation and two-finger tap will be broken.
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.
I tested both of these before submitting, and both rotation and two-finger tap still work.
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.
I just tried out this one change (without the rest of the changes in this PR), and all the gestures continue to work fine. In fact, performance improves dramatically with this one change. I think acceptsTouchEvents
is about raw touch events only, but MGLMapView uses gesture recognizers, which are unaffected by this property.
@jfirebaugh, is this remaining jankiness limited to zooming, or is it consistent with what you see when rotating or scrolling? |
With these changes, it's about equally noticeable across all gestures. |
Does that mean that scrolling becomes worse for you with this patch? |
they are canceling out trackpad scrolling events
- uses the same algorithm as the GLFW app to determine scrollwheel zoom speed - disables transitions which makes the trackpad feel faster due to immediate response
fb0ac3d
to
4770a9e
Compare
Zooming (easiest using Shift + drag) in the osxapp is noticeably janky, even in a Release build.
(Doesn't seem to have been caused by #2909; it was janky before that PR too.)