Open Bug 1022085 Opened 11 years ago Updated 3 years ago

Image flashing still happens

Categories

(Core :: Graphics, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: ehsan.akhgari, Unassigned)

Details

Whoa, Jeff, I can finally reproduce this bug quite reliably. STR: 1. Load a bugzilla tab. 2. Open another tab and load https://bugzilla.mozilla.org/show_bug.cgi?id=987040. 3. Press Cmd+R in the second tab. 4. Using Ctrl+Tab, keep switching between the tabs. After a while, the Mozilla logo on the top right side of the reloading bugzilla page starts to flash. This matches my observation on tons of other websites where the flashing starts with a tab switch. Can we please fix this? We've shipped this regression for far too long.
Flags: needinfo?(milan)
STR also require: * set image.mem.min_discard_timeout_ms to 1
So, we change the timeout from 10s to 1ms, and this starts happening? I don't feel horrible about this, if it only shows up in this scenario - unless it's just a simpler way of showing an underlying problem. Ehsan, you also have the 1ms timeout set when you see this?
Flags: needinfo?(milan)
Yeah, Ehsan had image.mem.min_discard_timeout_ms set to 1, I got that info talking to him via irc. Sorry for not being clear. The problem is continuous flashing (not just one flash), which means we discard and re-decode the image constantly. This means that the bug is likely to still be present with it set to 10000 just far more unlikely to occur I think (it'll depend on what the actual bug turns out to be). Usually painting the image once should mark it as visible and lock it and prevent it from being discarded, but that is not happening in this case.
Yeah agreed with what Timothy said. Once we figure out the cause we might realize that it actually can't happen with the default value of the pref, or something.
I think I've figured out what is happening here. When we reload the page we start the creation of a new document. After we get enough data for the new document a presentation (presshell, frames, etc) is created for the new document, but we still have the old document around and it still has its presentation. We continue drawing the old document until painting is unsuppressed in the new document. However between these two points in time SetIsActive calls to the presshell (telling the presshell it is either a foreground or background tab) go exclusively to the new document because the contentviewer and hence presshell stored on the docshell (where SetIsActive calls go through) now point to the new document. It is an unfortunate situation but we will only see it when image.mem.min_discard_timeout_ms is shorter than the interval between the new document getting a presentation and painting being unsuppressed in the new document, which is usually less than a second.
Yes, agreed. It doesn't sound like it's worth fixing to me.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.