Closed Bug 967449 Opened 11 years ago Closed 11 years ago

Enlarge the opposite axis's displayport when an axis's scrollable rect <= composition bounds rect

Categories

(Core :: Panning and Zooming, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30
blocking-b2g 1.3+
Tracking Status
firefox28 --- wontfix
firefox29 --- wontfix
firefox30 --- fixed
b2g-v1.3 --- fixed
b2g-v1.4 --- fixed

People

(Reporter: drs, Assigned: drs)

References

Details

(Whiteboard: [ETA: 2/6])

Attachments

(1 file, 2 obsolete files)

If a frame's scrollable rect is constrained on either axis to the frame's composition bounds, then that frame must not be scrollable along that axis. In this case, the displayport also can't be enlarged along this axis past the composition bounds. This gives us some extra freedom to enlarge the opposite axis, since we have more memory available. We should enlarge the displayport along the opposite axis in this case.
Assignee: nobody → bugzilla
Attachment #8369986 - Flags: review?(bugmail.mozilla)
This slightly improves checkerboarding, though only when we're stationary.
Blocks: 942750
blocking-b2g: --- → 1.3?
(In reply to Doug Sherk (:drs) from comment #2) > This slightly improves checkerboarding, though only when we're stationary. I meant going from stationary to moving as opposed to already panning or skating :)
Comment on attachment 8369986 [details] [diff] [review] Enlarge the opposite axis's displayport when an axis's scrollable rect <= composition bounds rect Review of attachment 8369986 [details] [diff] [review]: ----------------------------------------------------------------- Would like to see the updated patch before +'ing. Also put the entire commit message on one line. ::: gfx/layers/ipc/AsyncPanZoomController.cpp @@ +1311,5 @@ > + > + float xStationarySizeMultiplier = gXStationarySizeMultiplier, > + xSkateSizeMultiplier = gXSkateSizeMultiplier, > + yStationarySizeMultiplier = gYStationarySizeMultiplier, > + ySkateSizeMultiplier = gYSkateSizeMultiplier; You don't really need the *SkateSizeMultiplier local variables; you can just pass in the global ones to the EnlargeDisplayPortAlongAxis functions since they're never modified. @@ +1316,5 @@ > + > + // Check if the displayport, without being enlarged, fits tightly inside the > + // scrollable rect. If so, we're not going to be able to enlarge it, so we > + // should consider enlarging the opposite axis. > + if (scrollableRect.width - compositionBounds.width <= EPSILON) { I'd prefer to duplicate the conditionals rather than duplicate the body, to encapsulate this code better. That is, do: if (aFrameMetrics.GetDisableScrollingX() || (scrollableRect.width - compositionBounds.width <= EPSILON)) { ... } ... if (aFrameMetrics.GetDisableScrollingX()) { velocity.x = 0; } That way you can wrap the entire block of "new" code in a pref. In this case I don't mind making the pref enabled by default since I don't think it has much potential for regression.
Attachment #8369986 - Flags: review?(bugmail.mozilla) → review-
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #4) > Comment on attachment 8369986 [details] [diff] [review] > Enlarge the opposite axis's displayport when an axis's scrollable rect <= > composition bounds rect > > Review of attachment 8369986 [details] [diff] [review]: Ok, makes sense, except... > You don't really need the *SkateSizeMultiplier local variables; you can just > pass in the global ones to the EnlargeDisplayPortAlongAxis functions since > they're never modified. Could you clarify please? I'm using them and they do get modified at runtime.
xSkateSizeMultiplier and ySkateSizeMultiplier are never assigned to beyond the initial assignment. You modify xStationarySizeMultipler and yStationarySizeMultiplier only.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #6) > xSkateSizeMultiplier and ySkateSizeMultiplier are never assigned to beyond > the initial assignment. You modify xStationarySizeMultipler and > yStationarySizeMultiplier only. Oh yeah, you're right, OK.
Blocks: 967471
Addressed review comments.
Attachment #8369986 - Attachment is obsolete: true
Attachment #8370114 - Flags: review?(bugmail.mozilla)
Comment on attachment 8370114 [details] [diff] [review] Enlarge the opposite axis's displayport when an axis's scrollable rect <= composition bounds rect Review of attachment 8370114 [details] [diff] [review]: ----------------------------------------------------------------- Much better, thanks!
Attachment #8370114 - Flags: review?(bugmail.mozilla) → review+
1.3+: blocking two other blockers.
blocking-b2g: 1.3? → 1.3+
No longer depends on: 967442
Can we get ETA to fix this bug? Thank you.
I found that this wasn't actually improving checkerboarding, but I tweaked it to tune the skating multiplier instead of the stationary multiplier, and now it definitely is. Not much changed, but you might want to review it again anyways. For summary, s/xStationaryMultiplier/xSkateMultiplier/ and s/yStationaryMultiplier/ySkateMultiplier/.
Attachment #8370114 - Attachment is obsolete: true
Attachment #8370743 - Flags: review?(bugmail.mozilla)
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [ETA: 2/6]
Comment on attachment 8370743 [details] [diff] [review] Enlarge the opposite axis's displayport when an axis's scrollable rect <= composition bounds rect Review of attachment 8370743 [details] [diff] [review]: ----------------------------------------------------------------- r=me if you default the pref to false. I'm still a bit leery of increasing the displayport size while scrolling. Chris confirmed yesterday that doing that seems to make things worse at least in some cases. Also doing this by default largely negates having separate multipliers for stationary and skating to begin with.
Attachment #8370743 - Flags: review?(bugmail.mozilla) → review+
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #13) > r=me if you default the pref to false. Sure, done. https://hg.mozilla.org/integration/b2g-inbound/rev/2f2299a55c68
For reference, I noticed that this works better on pages that are more predictable. For example, this improves the SMS app more than the call log or contacts (probably because of the images). There's work going into using thumbnails instead of downscaled images for these apps, so they should run smoother after that too.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Flags: needinfo?(bugzilla)
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #17) > https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/93c27e195d94 > > Do we need this on any other branches? Not that I'm aware of. The only important one is b2g 1.3.
Flags: needinfo?(bugzilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: