Closed Bug 1056423 Opened 10 years ago Closed 10 years ago

Scrollbars flicker when applied to vertical home screen root scroll frame

Categories

(Core :: Graphics, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla35
Tracking Status
firefox33 --- wontfix
firefox34 --- fixed
firefox35 --- fixed
b2g-v2.0 --- wontfix
b2g-v2.0M --- wontfix
b2g-v2.1 --- verified
b2g-v2.2 --- verified

People

(Reporter: kgrandon, Assigned: kats)

References

Details

Attachments

(2 files, 1 obsolete file)

When we change the scrollable container in the vertical home screen it seems that it causes weirdness with scrollbar rendering. When scrolling quickly through the home screen the scrollbar flickers quite a bit and is distracting.

You can apply this patch to enable scrollbars in the root scroll frame of the vertical home screen: https://github.com/mozilla-b2g/gaia/pull/21703
Hey, just wondering if you guys are aware of this yet, and if anyone could help us look into it. To reproduce you can checkout the above branch and view the vertical home screen on a FxOS device. Thanks!
Flags: needinfo?(tnikkel)
Flags: needinfo?(matt.woodrow)
Blocks: 1033468
This is on master now; no longer need to apply the branch to reproduce it. It's quite distracting; I'll investigate.
Assignee: nobody → bugmail.mozilla
Flags: needinfo?(tnikkel)
Flags: needinfo?(matt.woodrow)
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → All
Jeff noticed this (or something similar) yesterday.
Just a quick update: I looked into this yesterday and was unable to determine the source of the flickering. The visible region of the scrollbar layer doesn't change in the time I see the flickering, so I don't think layout is clipping the layer (that was my original suspicion). I also did a layers dump post-compositor-culling and the effective visible region was unchanged, so it wasn't the compositor culling code trimming out parts. The culling code also wasn't skipping the layer entirely. So I'm not really sure what's going on. I'll continue investigating.
By increasing the APZ repaint interval to 5 seconds and disabling the code that applies an async transform to the scrollbars and observing the results I'm pretty sure the scrollbars are getting erroneously clipped in the compositor somewhere.
Attached patch Patch (obsolete) — Splinter Review
Scrollbar clip rect needs adjusting as well in the case where the scrollbar layer is a descendant of the layer with the async transform.
Attachment #8491548 - Flags: review?(botond)
Comment on attachment 8491548 [details] [diff] [review]
Patch

Review of attachment 8491548 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/composite/AsyncCompositionManager.cpp
@@ +143,5 @@
> +  const nsIntRect* clipRect = aLayer->GetClipRect();
> +  if (clipRect) {
> +    gfx::Rect transformed = aTransform.TransformBounds(
> +        gfx::Rect(clipRect->x, clipRect->y, clipRect->width, clipRect->height));
> +    nsIntRect shadowClip(transformed.x, transformed.y, transformed.width, transformed.height);

Assuming it's appropriate to consider the clip rect to be in Layer pixels, this can be written a bit more concisely as:

nsIntRect shadowClip = TransformTo<LayerPixel>(LayerIntRect::FromUntyped(*clipRect)).ToUntyped();

(#incude "UnitTransforms.h" for TransformTo).
Attachment #8491548 - Flags: review?(botond) → review+
(In reply to Botond Ballo [:botond] from comment #8)
> nsIntRect shadowClip =
> TransformTo<LayerPixel>(LayerIntRect::FromUntyped(*clipRect)).ToUntyped();

Er, that should be:

nsIntRect shadowClip = TransformTo<LayerPixel>(aTransform, LayerIntRect::FromUntyped(*clipRect)).ToUntyped();
Attached patch Patch v2Splinter Review
Had to add a new TransformTo to make it work, rerequesting review.
Attachment #8491548 - Attachment is obsolete: true
Attachment #8491571 - Flags: review?(botond)
Attachment #8491571 - Flags: review?(botond) → review+
Comment on attachment 8491571 [details] [diff] [review]
Patch v2

Approval Request Comment
[Feature/regressing bug #]: bug 995519 exposed this bug, because prior to that we didn't show scrollbars on the root scrollable frame anywhere. Now that we do, this bug appeared because the code to handle that case was wrong
[User impact if declined]: scrollbars on the root scrollframe of any B2G app or in the browser will flicker when scrolling around rapidly
[Describe test coverage new/current, TBPL]: local testing only
[Risks and why]: low-risk, code is well understood, fix is well contained
[String/UUID change made/needed]: none
Attachment #8491571 - Flags: approval-mozilla-aurora?
Comment on attachment 8491571 [details] [diff] [review]
Patch v2

Aurora+
Attachment #8491571 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
This issue has been verified successfully on Flame2.1&2.2
Verify video:"verify_1056423.mp4".
**See detial step in Comment2(bug 1067528).

Flame2.1 build:
Gaia-Rev        5655269098c7e82254e56933f1af05b4abe2a2f3
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/86608c9389b5
Build-ID        20141204001201
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141204.034958
FW-Date         Thu Dec  4 03:50:09 EST 2014
Bootloader      L1TC00011880

Flame2.2 bulid:
Gaia-Rev        984e6d79aa799d2695f9ca132dfdc1665a56c019
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/a9fc46355661
Build-ID        20141204040202
Version         37.0a1
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141204.072651
FW-Date         Thu Dec  4 07:27:05 EST 2014
Bootloader      L1TC00011880
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: