Tune flinging friction and logic in AsyncPanZoomController

RESOLVED FIXED in mozilla17

Status

()

Core
Graphics: Layers
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: drs, Assigned: drs)

Tracking

(Blocks: 1 bug)

unspecified
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Flings run very slow in no-opt/debug builds and sometimes have logical errors like applying too much resistance during very large time steps that the fling actually goes backwards.

In addition, the frictions values are very far off from being optimal. Now that gralloc has landed on B2G, I can properly tune it. This will probably need additional work in the future.
(Assignee)

Updated

5 years ago
Blocks: 745136
(Assignee)

Updated

5 years ago
Summary: Tune flinging in Gecko's AsyncPanZoomController → Tune flinging friction and logic in AsyncPanZoomController
(Assignee)

Comment 1

5 years ago
Created attachment 644714 [details] [diff] [review]
Proposed patch
Assignee: nobody → bugzilla
Attachment #644714 - Flags: review?(jones.chris.g)
Comment on attachment 644714 [details] [diff] [review]
Proposed patch

>diff --git a/gfx/layers/ipc/AsyncPanZoomController.cpp b/gfx/layers/ipc/AsyncPanZoomController.cpp

>-  if (!mX.FlingApplyFrictionOrCancel(aDelta) && !mY.FlingApplyFrictionOrCancel(aDelta)) {
>+  bool shouldContinueFlingX = mX.FlingApplyFrictionOrCancel(aDelta),
>+       shouldContinueFlingY = mY.FlingApplyFrictionOrCancel(aDelta);
>+  // If we shouldn't continue the fling, let's just stop and repaint.
>+  if (!shouldContinueFlingX && !shouldContinueFlingY) {

Let's do

  if (mX.Blah() || mY.Blah()) {
Attachment #644714 - Flags: review?(jones.chris.g) → review+
(Assignee)

Comment 3

5 years ago
I believe it may have been getting short-circuited.
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/8aa24637d3fa

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/8aa24637d3fa
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.