White flash when panning around, especially during overscroll

RESOLVED WORKSFORME

Status

()

Firefox for Android
General
P3
normal
RESOLVED WORKSFORME
7 years ago
2 years ago

People

(Reporter: pcwalton, Unassigned)

Tracking

unspecified
ARM
Android
Points:
---

Firefox Tracking Flags

(fennec11+)

Details

(Reporter)

Description

7 years ago
I'm getting a lot of unsightly white flashes when rapidly panning around on many pages. This is most easily reproducible by opening a big image and panning rapidly from side to side, overscrolling. You will see white flashes occur briefly and disappear. It seems to be easiest to reproduce when rendering during overscroll.

Some notes:
* The white comes from the color of the XUL window; this has been verified by changing it to blue.
* Because the XUL window is showing through, it appears that we're briefly clipping content right after the scroll position is changed and the CSS transform is set, despite the fact that clipSubdocument is false on the <browser> element.
* This does not seem to be related to gralloc (a feature of the Java compositor). The problem persists even when gralloc is turned off.
* This does not seem to be due to retained layers; the problem persists with retained layers forced to flush.
* This is not due to the scale applied to the <browser> element; the problem persists with the scale disabled.

Here's a suspicious-looking paint list. (Ignore the outlines: I added CSS outlines to the browser element so I could see its boundaries.)

01-05 23:33:11.164 23394 23404 E Fennec  : Painting --- before optimization (dirty 0,0,122880,122880):
01-05 23:33:11.164 23394 23404 E Fennec  : SolidColor 0x4a47c810() (0,0,122880,122880)(0,0,0,0) uniform
01-05 23:33:11.171 23394 23404 E Fennec  : Background 0x4a47cc70() (0,0,122880,122880)(0,0,0,0) uniform
01-05 23:33:11.171 23394 23404 E Fennec  : Background 0x4a47cdd0() (0,0,122880,122880)(0,0,0,0) uniform
01-05 23:33:11.171 23394 23404 E Fennec  : Clip 0x4a29f058() (0,0,122880,122880)(0,0,0,0)
01-05 23:33:11.171 23394 23404 E Fennec  : WrapList 0x4a29f058() (3540,-3840,80460,49680)(0,0,0,0)
01-05 23:33:11.171 23394 23404 E Fennec  : nsDisplayTransform 0x4a29f058() (3540,-3840,80460,49680)(0,0,0,0)
01-05 23:33:11.171 23394 23404 E Fennec  : OwnLayer 0x4c0f2810() (-15540,0,42000,42000)(0,0,0,0)
01-05 23:33:11.171 23394 23404 E Fennec  : CanvasBackground 0x4c0f2d68() (-15540,0,42000,42000)(0,0,0,0) uniform
01-05 23:33:11.171 23394 23404 E Fennec  : Background 0x4c0f3f40() (-15540,0,21600,0)(0,0,0,0) uniform
01-05 23:33:11.171 23394 23404 E Fennec  : WrapList 0x4c0f9e00() (-15540,0,42000,42000)(0,0,0,0)
01-05 23:33:11.171 23394 23404 E Fennec  : Image 0x4c0f9e00() (-15540,0,42000,42000)(0,0,0,0)
01-05 23:33:11.179 23394 23404 E Fennec  : Outline 0x4a29f058() (-1920,-3840,66840,49680)(0,0,0,0)

01-05 23:33:11.218 23394 23404 E Fennec  : Painting --- after optimization:
01-05 23:33:11.218 23394 23404 E Fennec  : SolidColor 0x4a47c810() (0,0,122880,122880)(0,0,122880,122880) uniform
01-05 23:33:11.218 23394 23404 E Fennec  : Background 0x4a47cc70() (0,0,122880,122880)(0,0,122880,122880) uniform
01-05 23:33:11.218 23394 23404 E Fennec  : Background 0x4a47cdd0() (0,0,122880,122880)(0,0,122880,122880) uniform
01-05 23:33:11.218 23394 23404 E Fennec  : Clip 0x4a29f058() (0,0,122880,122880)(3540,0,80460,45840)
01-05 23:33:11.218 23394 23404 E Fennec  : nsDisplayTransform 0x4a29f058() (3540,-3840,80460,49680)(3540,0,80460,45840)
01-05 23:33:11.218 23394 23404 E Fennec  : OwnLayer 0x4c0f2810() (-15540,0,42000,42000)(-1920,0,28380,42000)
01-05 23:33:11.218 23394 23404 E Fennec  : CanvasBackground 0x4c0f2d68() (-15540,0,42000,42000)(-1920,0,28380,42000) uniform
01-05 23:33:11.218 23394 23404 E Fennec  : Background 0x4c0f3f40() (-15540,0,21600,0)(0,0,0,0) uniform
01-05 23:33:11.218 23394 23404 E Fennec  : Image 0x4c0f9e00() (-15540,0,42000,42000)(-1920,0,28380,42000)
01-05 23:33:11.218 23394 23404 E Fennec  : Outline 0x4a29f058() (-1920,-3840,66840,49680)(-1920,-3840,66840,49680)


Notice that the visible rect of the image is smaller than its dimensions. This is not what I would expect, because clipSubdocument is off for the <browser> and the page is not zoomed (so no scale is being applied).

roc, do you have any ideas?
(Reporter)

Updated

7 years ago
OS: Mac OS X → Android
Hardware: x86 → ARM
So in this case the flash is on the left? Do you happen to know what the transform is? It looks like the visibility of the transform's child OwnLayer (which wraps the Web content) has been restricted by the nsDisplayTransform, but it's a little hard to tell why.
And where does that Clip 0x4a29f058 come from? That looks a bit suspicious. You probably don't want it. It's outside the transform so it must be something in the XUL document.
(Reporter)

Comment 3

7 years ago
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #1)
> So in this case the flash is on the left? Do you happen to know what the
> transform is? It looks like the visibility of the transform's child OwnLayer
> (which wraps the Web content) has been restricted by the nsDisplayTransform,
> but it's a little hard to tell why.

Yes, the flash was on the left, right outside the outline of the <browser>. I don't have the exact transform saved, but it was close to translate(1500px, 0).

> And where does that Clip 0x4a29f058 come from? That looks a bit suspicious. You
> probably don't want it. It's outside the transform so it must be something in the XUL
> document.

The hierarchy up from the browser is <vbox>, <deck>, <window>. Perhaps it's the deck.
Actually the clip looks OK since its bounds are equal to the bounds of the document background. But why did its visibility end up at 3540,0,80460,45840? That seems suspicious. Isn't its visibility normally covering the entire XUL window?
(Reporter)

Comment 5

7 years ago
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #4)
> Actually the clip looks OK since its bounds are equal to the bounds of the
> document background. But why did its visibility end up at
> 3540,0,80460,45840? That seems suspicious. Isn't its visibility normally
> covering the entire XUL window?

I would think so, yes. No idea why, but I thought it looked suspicious too :)

Comment 6

7 years ago
I ran into this when trying to reproduce bug 706023 - I'm not sure if that bug is referring to this problem or another, unrelated problem, but it contains instructions that make this very easy to reproduce.
I believe bug 714709 and possibly bug 709813 (based on more investigation today) to be related. Both are 100% reproducible for me.

Updated

7 years ago
tracking-firefox11: --- → +
Priority: -- → P3

Updated

7 years ago
tracking-fennec: --- → 11+
tracking-firefox11: + → ---
(Reporter)

Comment 8

7 years ago
This is especially severe when combined with tiling. Half of the tiles on the screen start out as white. I don't think we can uplift tiling to Aurora before this is fixed.

Comment 9

7 years ago
(In reply to Patrick Walton (:pcwalton) from comment #8)
> This is especially severe when combined with tiling. Half of the tiles on
> the screen start out as white. I don't think we can uplift tiling to Aurora
> before this is fixed.

The bad effect with tiling is just because of bug #722068 - I have a fix for this (tidying, uploading in a mo), after which tiled rendering is affected no worse than the non-tiled path.
Is this bug in reference to what I see on devices with Adreno GPU's (specifically 200/205) during a pan? What is the solution for non-gralloc enabled devices?
(In reply to Aaron Train [:aaronmt] from comment #10)
> Is this bug in reference to what I see on devices with Adreno GPU's
> (specifically 200/205) during a pan? What is the solution for non-gralloc
> enabled devices?

What are you referring to here? There have, unfortunately, been a few bugs that manifest with weird visuals during panning recently. This particular bug is quite rare, for me at least, but happens on all devices regardless of gralloc.
(In reply to Chris Lord [:cwiiis] from comment #11)
> What are you referring to here? There have, unfortunately, been a few bugs
> that manifest with weird visuals during panning recently. This particular
> bug is quite rare, for me at least, but happens on all devices regardless of
> gralloc.

Perhaps a little vague, was referring to the white areas before content appears that I see on the Nexus One (Adreno 200) while panning (see vid: http://www.youtube.com/watch?v=oPD_e2ro-FY&hd=1). I question if it's related to this bug or not that's all.
(In reply to Aaron Train [:aaronmt] from comment #12)
> (In reply to Chris Lord [:cwiiis] from comment #11)
> > What are you referring to here? There have, unfortunately, been a few bugs
> > that manifest with weird visuals during panning recently. This particular
> > bug is quite rare, for me at least, but happens on all devices regardless of
> > gralloc.
> 
> Perhaps a little vague, was referring to the white areas before content
> appears that I see on the Nexus One (Adreno 200) while panning (see vid:
> http://www.youtube.com/watch?v=oPD_e2ro-FY&hd=1). I question if it's related
> to this bug or not that's all.

Ah, that's bug #722325, this bug manifests slightly differently and is much more rare/less annoying.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.