After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735223 - Touch scrolling invalidates more than intended
Touch scrolling invalidates more than intended
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkScrolledWindow
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-08-22 14:38 UTC by Carlos Garnacho
Modified: 2014-08-28 14:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
scrolledwindow: Be smarter at invalidating overshoot areas (3.68 KB, patch)
2014-08-22 14:39 UTC, Carlos Garnacho
none Details | Review
residue (43.23 KB, image/png)
2014-08-24 01:41 UTC, Matthias Clasen
  Details
scrolledwindow: Be smarter at invalidating overshoot areas (3.96 KB, patch)
2014-08-27 11:59 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2014-08-22 14:38:55 UTC
Currently when touch scrolling, the scrolled window is a bit too happy at invalidating contents, just in case the overshoot edge gradients kick in or need updating. This was strangely most noticeable to me in wayland, as the performance decrease caused by the constant redraws was quite perceptible.

I'm attaching a patch that makes smarter invalidation, both in the invalidated area size and the times it kicks in, this makes touch scrolling snappy in wayland for me.
Comment 1 Carlos Garnacho 2014-08-22 14:39:28 UTC
Created attachment 284217 [details] [review]
scrolledwindow: Be smarter at invalidating overshoot areas

The previous way to invalidate was meant to work on the overshoot window
so it wouldn't be as taxing. Since the overshoot window is gone, this
would invalidate way more than intended. So constrain invalidated areas
to the sides where overshoot is happenning at that moment.
Comment 2 Matthias Clasen 2014-08-24 01:41:19 UTC
Created attachment 284320 [details]
residue

with this patch, I'm seeing a small strip of the overshoot glow remain
Comment 3 Carlos Garnacho 2014-08-27 11:59:41 UTC
Created attachment 284594 [details] [review]
scrolledwindow: Be smarter at invalidating overshoot areas

The previous way to invalidate was meant to work on the overshoot window
so it wouldn't be as taxing. Since the overshoot window is gone, this
would invalidate way more than intended. So constrain invalidated areas
to the sides where overshoot is happenning at that moment.
Comment 4 Matthias Clasen 2014-08-27 18:45:34 UTC
Review of attachment 284594 [details] [review]:

if you tested that this doesn't leave anything behind, fine with me.
Comment 5 Carlos Garnacho 2014-08-28 14:43:43 UTC
(In reply to comment #4)
> Review of attachment 284594 [details] [review]:
> 
> if you tested that this doesn't leave anything behind, fine with me.

Yeah, at all angles this time :), I wasn't accounting for the scrollbars' space.
Comment 6 Carlos Garnacho 2014-08-28 14:44:56 UTC
Attachment 284594 [details] pushed as 42c41d7 - scrolledwindow: Be smarter at invalidating overshoot areas