Closed
Bug 976035
Opened 11 years ago
Closed 11 years ago
Add a preffable velocity cap when flinging
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
People
(Reporter: kats, Assigned: bkelly)
References
Details
(Keywords: perf, Whiteboard: [c= p= s= u=])
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
Spinoff from https://bugzilla.mozilla.org/show_bug.cgi?id=975831#c19 - Ben Kelly suggested putting a velocity cap to limit how fast we can scroll, thereby limiting the chances of running into checkerboarding. Seems like a reasonable idea so I'm spinning out a dedicated bug for it.
Assignee | ||
Comment 1•11 years ago
|
||
Thanks for filing kats! I'll take this since its simple enough for me to do and I imagine you guys are busy with heavier lifting in gfx for tiling, etc.
Assignee | ||
Comment 2•11 years ago
|
||
Initial patch introducing the velocity limitation and preference. I'm going to see if I can write a gtest for this before asking for review.
Assignee | ||
Comment 3•11 years ago
|
||
Add the preference to b2g so it can be easily tuned. Took me a bit to realize float values must be specified as strings in the file.
Reporter | ||
Comment 4•11 years ago
|
||
Comment on attachment 8380656 [details] [diff] [review]
bug976035_part1_max_velocity.patch
Review of attachment 8380656 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/ipc/Axis.cpp
@@ +96,5 @@
> }
>
> void Axis::UpdateWithTouchAtDevicePoint(int32_t aPos, const TimeDuration& aTimeDelta) {
> float newVelocity = mAxisLocked ? 0 : (mPos - aPos) / aTimeDelta.ToMilliseconds();
> + float cappedVelocity = std::min(newVelocity, gMaxVelocity);
I'd like there to be a way to explicitly disable it too. I think if gMaxVelocity < 0 then just use newVelocity without capping it. Also make gMaxVelocity -1 by default so that on non-b2g platforms no pref changes are needed to keep the current behaviour. b2g.js can set it to 6.0 to cap it on b2g.
Assignee | ||
Comment 5•11 years ago
|
||
Excellent point. Updated to treat negative values as unlimited velocity. Defaults to unlimited velocity.
Attachment #8380656 -
Attachment is obsolete: true
Reporter | ||
Comment 6•11 years ago
|
||
Comment on attachment 8380709 [details] [diff] [review]
bug976035_part1_max_velocity.patch (v2)
Review of attachment 8380709 [details] [diff] [review]:
-----------------------------------------------------------------
Pre-emptive r+. It might be a bit hard to write a test for this code so I'd rather land the patch now and worry about that later.
Attachment #8380709 -
Flags: review+
Reporter | ||
Comment 7•11 years ago
|
||
Comment on attachment 8380700 [details] [diff] [review]
bug976035_part2_b2g_pref.patch
Review of attachment 8380700 [details] [diff] [review]:
-----------------------------------------------------------------
Would be good to check if this is suitable for higher DPI devices like the nexus 4 and nexus 5 as well.
Attachment #8380700 -
Flags: review+
Assignee | ||
Comment 8•11 years ago
|
||
Try build before pushing:
https://tbpl.mozilla.org/?tree=Try&rev=a6fca7526089
Also starting a nexus4 build locally to test there. Since I have never flashed this nexus4, though, I probably will not hold up landing this if I run into problems with the device.
Assignee | ||
Comment 9•11 years ago
|
||
Nom for 1.4? to help mitigate checkerboarding issues.
blocking-b2g: --- → 1.4?
Updated•11 years ago
|
blocking-b2g: 1.4? → 1.4+
Assignee | ||
Comment 10•11 years ago
|
||
Try was green. Still working on my nexus-4, but even if the setting is not quite right there I don't think we want to hold it back from our main release phones. Ultimately we probably need a device-specific pref strategy, but thats a separate bug.
Landed in b2g-inbound:
remote: https://hg.mozilla.org/integration/b2g-inbound/rev/8db8eddda6f8
remote: https://hg.mozilla.org/integration/b2g-inbound/rev/bc2c4bd25713
Comment 11•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8db8eddda6f8
https://hg.mozilla.org/mozilla-central/rev/bc2c4bd25713
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Assignee | ||
Comment 12•11 years ago
|
||
Note, scrolling does seem a bit slow with this in place on the nexus-4. Perhaps we need to adjust this to be something like device-screens/second and then calculate the corresponding pixels/ms.
Kats, what do you think?
Flags: needinfo?(bugmail.mozilla)
Comment 13•11 years ago
|
||
Kats away until 3/6. BenWa, Botond?
Comment 14•11 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #12)
> Note, scrolling does seem a bit slow with this in place on the nexus-4.
> Perhaps we need to adjust this to be something like device-screens/second
> and then calculate the corresponding pixels/ms.
That sounds reasonable to me. I'm happy to review a patch that does this.
Assignee | ||
Comment 15•11 years ago
|
||
Thanks. I'll write a new bug up tonight.
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(bugmail.mozilla)
Updated•11 years ago
|
status-b2g-v1.4:
--- → fixed
status-firefox28:
--- → wontfix
status-firefox29:
--- → wontfix
status-firefox30:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•