Closed
Bug 967502
Opened 10 years ago
Closed 10 years ago
Add a pref to disallow checkerboarding
Categories
(Core :: Panning and Zooming, defect)
Core
Panning and Zooming
Tracking
()
People
(Reporter: cwiiis, Assigned: cwiiis)
References
Details
Attachments
(5 files, 3 obsolete files)
4.30 KB,
patch
|
kats
:
review+
botond
:
feedback+
kats
:
checkin+
|
Details | Diff | Splinter Review |
1.00 KB,
patch
|
Details | Diff | Splinter Review | |
1.02 KB,
patch
|
mbrubeck
:
feedback+
|
Details | Diff | Splinter Review |
1.82 KB,
patch
|
vingtetun
:
review+
kats
:
checkin+
|
Details | Diff | Splinter Review |
2.29 KB,
patch
|
vingtetun
:
review+
kats
:
checkin+
|
Details | Diff | Splinter Review |
So at the moment, it's allowed for our asynchronous scroll position to vary from the last content scroll position enough that you can see areas we haven't rendered yet. I pose that if we never want checkerboarding, then we can just not allow it. About to attach a patch that gets rid of checkerboarding - in the situations where we would have checkerboarded, this patch will cause us to experience 'jank' instead. In my short testing, it's actually quite nice - the perfect render coherency makes things feel more 'solid'. We may want to consider turning this on *and* working to reduce the situations where we'd checkerboard so that it rarely gets triggered on b2g. I also propose that we may want this always on on desktop too, where the times we checkerboard are very brief to the point that dropping a frame or two might be more desirable.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee: nobody → chrislord.net
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
For testing.
Assignee | ||
Comment 3•10 years ago
|
||
Assignee | ||
Comment 4•10 years ago
|
||
I'm not sure what we want to do with these patches just yet, so I'm leaving off flags - we can discuss it in today's gfx daily meeting.
Assignee | ||
Comment 5•10 years ago
|
||
Do you think you could cook up a patch to add a switch in UI to disable checkerboarding? (i.e. setting pref layers.allow-checkerboarding to false).
Flags: needinfo?(21)
Comment 6•10 years ago
|
||
Comment on attachment 8370045 [details] [diff] [review] Add a pref that can disable checkerboarding Review of attachment 8370045 [details] [diff] [review]: ----------------------------------------------------------------- I think you could just put the pref in AsyncPanZoomController.cpp and call it apz.allow-checkerboarding. It seems fairly contained; no need to expose it to the rest of the gfx code if it's not going to be needed there. ::: gfx/layers/ipc/AsyncPanZoomController.cpp @@ +1525,5 @@ > + if (!gfxPlatform::GetPrefLayersAllowCheckerboarding() && > + !mLastContentPaintMetrics.mDisplayPort.IsEmpty()) { > + CSSPoint maxScrollOffset = lastPaintScrollOffset + > + CSSPoint(mLastContentPaintMetrics.mDisplayPort.XMost() - mLastContentPaintMetrics.mViewport.width, > + mLastContentPaintMetrics.mDisplayPort.YMost() - mLastContentPaintMetrics.mViewport.height); Instead of mViewport I think you want to be using CalculateCompositedRectInCSSPixels(). mViewport is supposed to be the CSS viewport which is irrelevant here.
Assignee | ||
Comment 7•10 years ago
|
||
Note, this will not interact correctly with progressive rendering - you may still see checkerboarding with progressive rendering and tiles enabled (though if the coherency checks are working (they likely aren't), it's quite unlikely).
Assignee | ||
Comment 8•10 years ago
|
||
Made kats' suggested changes - pref is now apz.allow-checkerboarding.
Attachment #8370045 -
Attachment is obsolete: true
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8370046 -
Attachment is obsolete: true
Assignee | ||
Comment 10•10 years ago
|
||
Attachment #8370047 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8370059 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Updated•10 years ago
|
Summary: Disallow checkerboarding → Add a pref to disallow checkerboarding
Comment 11•10 years ago
|
||
Comment on attachment 8370059 [details] [diff] [review] Add a pref that can disable checkerboarding Review of attachment 8370059 [details] [diff] [review]: ----------------------------------------------------------------- This looks ok to me, but I'd like botond to also check that I didn't miss anything, since GetCurrentAsyncTransform is used as part of our input transformation chain as well. I think this change is fine as it will affect both of those in the same way, and so input will still be untransformed properly.
Attachment #8370059 -
Flags: review?(bugmail.mozilla)
Attachment #8370059 -
Flags: review+
Attachment #8370059 -
Flags: feedback?(botond)
Comment 13•10 years ago
|
||
Attachment #8370096 -
Flags: review?(kgrandon)
Updated•10 years ago
|
Attachment #8370093 -
Flags: review?(21)
Attachment #8370093 -
Flags: review?(21) → review+
Attachment #8370096 -
Flags: review?(kgrandon) → review+
Updated•10 years ago
|
Attachment #8370061 -
Flags: feedback?(mbrubeck)
Assignee | ||
Comment 14•10 years ago
|
||
Comment on attachment 8370093 [details] [diff] [review] Expose developer setting (Gecko patch) So I don't think this pref alone is going to compare favourably with a better set of displayport settings. Can we have a separate option to turn it on/off in addition to the displayport tweaks?
Comment 15•10 years ago
|
||
Rather than introduce a combinatorial explosion of options for people to test, I would rather find a set of settings that you think works well with this pref, and set those as well in settings.js. Feel free to update that patch directly or let me know which settings you think would be good.
Comment 16•10 years ago
|
||
Are you sure we're not introducing too much bias by combining different settings ourselves? I would actually prefer the combinatorial explosion in this case.
Comment 17•10 years ago
|
||
Comment on attachment 8370059 [details] [diff] [review] Add a pref that can disable checkerboarding Review of attachment 8370059 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the min <= max check added. Note that, as far as I can tell, this patch does not disallow checkerboarding when zooming out, so characterizing it as such and calling the pref "apz.allow-checkerboarding" might be a bit inaccurate. Don't want to hold it up because of this though. ::: gfx/layers/ipc/AsyncPanZoomController.cpp @@ +1533,5 @@ > + CSSRect compositedRect = mLastContentPaintMetrics.CalculateCompositedRectInCssPixels(); > + CSSPoint maxScrollOffset = lastPaintScrollOffset + > + CSSPoint(mLastContentPaintMetrics.mDisplayPort.XMost() - compositedRect.width, > + mLastContentPaintMetrics.mDisplayPort.YMost() - compositedRect.height); > + CSSPoint minScrollOffset = lastPaintScrollOffset + mLastContentPaintMetrics.mDisplayPort.TopLeft(); We should check that minScrollOffset <= maxScrollOffset. I think this can be false if we are sufficiently zoomed out that the last painted display port only covers part of the current composition bounds. In such a case, we have to checkerboard unless we also clamp the zoom here. @@ +1539,5 @@ > + if (currentScrollOffset.x < minScrollOffset.x) { > + currentScrollOffset.x = minScrollOffset.x; > + } else if (currentScrollOffset.x > maxScrollOffset.x) { > + currentScrollOffset.x = maxScrollOffset.x; > + } This can be written: currentScrollOffset.x = clamped(currentScrollOffset.x, minScrollOffset.x, maxScrollOffset.x); (up to you if you like this better).
Attachment #8370059 -
Flags: feedback?(botond) → feedback+
Comment 18•10 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #17) > r=me with the min <= max check added. Er, f+ rather. You know what I mean :)
Comment 19•10 years ago
|
||
(In reply to Milan Sreckovic [:milan] from comment #16) > Are you sure we're not introducing too much bias by combining different > settings ourselves? I would actually prefer the combinatorial explosion in > this case. To some extent we are introducing bias, yes. However I think it's unlikely that QA will be able to test the entire range of APZ use cases for each of the combinations of settings - there's just too many possibilities. It makes sense for us to remove those settings which we know will fall down in some cases. For example, reducing the displayport width to 1.0 will work fine in gaia apps but will cause horizontal checkerboarding in the browser because they can scroll horizontally whereas gaia apps cannot. So it doesn't make sense to offer that option as it will clearly regress some cases. That being said, yes, we can definitely add more options to the list - I would be ok with just calling them "Heuristic 1", "Heuristic 2" and so on and add lots of different combinations. The ones I started off with I thought were sufficiently different from each other to provide a good range of options, and then if some emerged as better overall or in particular scenarios we could further refine or hybridize them. /me wants to write an evolutionary algorithm that finds the best one...
Comment 20•10 years ago
|
||
Comment on attachment 8370061 [details] [diff] [review] Disallow checkerboarding on Metro Review of attachment 8370061 [details] [diff] [review]: ----------------------------------------------------------------- Seems to work fine on Metro, and lack of black flashes is nice. I only have fairly high-end Win8 hardware here though, so checkerboarding is already quite rare. Should probably test on low-end hardware and/or slower-painting pages.
Attachment #8370061 -
Flags: feedback?(mbrubeck) → feedback+
Assignee | ||
Comment 21•10 years ago
|
||
"Add a pref that can disable checkerboarding" pushed to inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/1b0e02d99ab1
Comment 22•10 years ago
|
||
PR for the gaia patch: https://github.com/mozilla-b2g/gaia/pull/15989
Updated•10 years ago
|
Attachment #8370059 -
Flags: checkin+
Comment 23•10 years ago
|
||
Comment on attachment 8370093 [details] [diff] [review] Expose developer setting (Gecko patch) https://hg.mozilla.org/integration/mozilla-inbound/rev/a8d39ea09148
Attachment #8370093 -
Flags: checkin+
Comment 24•10 years ago
|
||
landing |
https://github.com/mozilla-b2g/gaia/commit/3711792ac529fd8ca0b065fa303fe03e64e065e1
Updated•10 years ago
|
Attachment #8370096 -
Flags: checkin+
Comment 25•10 years ago
|
||
landing |
https://hg.mozilla.org/mozilla-central/rev/1b0e02d99ab1
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Comment 26•10 years ago
|
||
I did some profiling with this: http://people.mozilla.org/~bgirard/cleopatra/#report=275f2b22aa8f38d13890ed0be9a3afe88e5dd501 This patch doesn't stop us from compositing frames so we could actually save a ton of memory bandwidth by fixing that speeding up the main thread painting.
Comment 27•10 years ago
|
||
landing |
https://hg.mozilla.org/mozilla-central/rev/a8d39ea09148
Comment 28•10 years ago
|
||
We want this stuff uplifted to 1.3 to try and mitigate bug 942750
blocking-b2g: --- → 1.3?
Updated•10 years ago
|
blocking-b2g: 1.3? → 1.3+
Comment 29•10 years ago
|
||
landing |
https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/8b23dde77abe v1.3: 51e166e07e582027c2d57498232a5476918e3b41
status-b2g-v1.3:
--- → fixed
status-b2g-v1.4:
--- → fixed
status-firefox28:
--- → wontfix
status-firefox29:
--- → wontfix
status-firefox30:
--- → fixed
Comment 30•10 years ago
|
||
landing |
https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/e2efd22ca22d
You need to log in
before you can comment on or make changes to this bug.
Description
•