White background during image loading
Categories
(Core :: Graphics: WebRender, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox67 | --- | wontfix |
| firefox68 | --- | wontfix |
| firefox69 | --- | fix-optional |
| firefox70 | --- | fix-optional |
People
(Reporter: mail, Unassigned)
References
(Blocks 1 open bug, Regression, )
Details
(Keywords: regression)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
Steps to reproduce:
Loading a non-progressive JPEG image
Actual results:
Firefox 67 now shows a white background in the yet-unloaded region of a (non-progressive) JPEG image. Earlier versions of Firefox didn't show anything in the unloaded region.
Expected results:
The background of the yet-unloaded image region should be transparent. Safari, Chrome and earlier Firefox version have this behavior.
Test case with screenshots:
https://phoboslab.org/files/bugs/firefox-image-loading/
Comment 1•6 years ago
|
||
Works as expected with webrender disabled in the latest nightly.
Last good: 2017-11-23
First bad: 2017-11-24
Push log: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=bdb2387396b4a74dfefb7c983733eed3625e906a&tochange=e8ce4865e42125850e6371eba3c5e71cf5ab6d29
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Marking as wontfix for 67 as it doesn't seem like a major issue that would require taking the risk of an uplift from mozilla-central to mozilla-release.
Comment 3•6 years ago
|
||
I'm pretty sure this is a regression from bug 1183378. Fixing it may be somewhat difficult, depending on the approach. We start JPEGs in BGRX, so that's why an incomplete JPEG is white. We would either need to defer drawing background images until the image is complete (I thought there was some logic surrounding this but...) or start JPEGs in BGRA and upgrade to BGRX once decoding has finished.
Comment 4•6 years ago
|
||
Too late for a fix in 68 but we could still take a patch in 69.
Comment 5•6 years ago
|
||
Happy to take a patch for 70 but since this is triaged and set to P3 priority I'm setting it as fix-optional.
That will remove the bug from weekly regression triage.
Updated•5 years ago
|
Comment 6•4 years ago
|
||
Version 88 and they still didn't fix it? Please do, it's an annoying bug. How do you want to compete with Chrome? I'd fix it myself if I could.
Updated•3 years ago
|
Comment 7•3 years ago
|
||
The problem does not happen when using
<svg viewBox="0 0 width height">
<image x="0" y="0" width="width" height="height" href="src"></image>
</svg>
instead of plain
<img width="width" height="height" src="src" />
I only accidentally found this workaround when trying to solve something else.
My browser info:
96.0.3 (64-bit)
Linux
Comment 8•3 years ago
|
||
"Trevor Rowbotham [:rowbot] : "Works as expected with webrender disabled.""
Can we expect a fix for this bug before ESR 102 lands and forces Webrender to everyone?
This one is especially annoying when using pop-up image enlargers like Imagus, Mouseover popup image viewers etc.
Turns entire screen to white while loading images and ruins the dark mode experience.
see an example here : https://www.reddit.com/r/imagus/comments/sp58gm/anyone_knows_how_to_change_this_white_color_to/
103.0 and this bug is glaringly obvious and looks outright horrible. Chrome, Opera, Edge behave as expected, just Firefox doesn't?
Comment 10•3 years ago
|
||
This seems to affect jpeg but not avif images. Perhaps its the progressive loading?
Updated•3 years ago
|
Comment 11•2 years ago
|
||
Still having this issue as of Firefox 116. Huge bummer for darkmode, forces me to use chrome
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 13•1 year ago
|
||
Bug 1231622 made this bug apply to css images (backgrounds) too.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 14•1 year ago
|
||
After having my memory refreshed, it was determined by the Graphics team that this issue remains valid, and is actually currently impacting users employing "dark mode." As this has the potential to affect many users, and could cause them to switch browsers, an S2 rating remains valid.
Comment 15•1 year ago
|
||
Assigning to Tim for tracking purposes.
Comment 16•1 year ago
|
||
Tim, do you think this is imageLib instead of WebRender?
Comment 17•1 year ago
|
||
It's kind of crosses the boundary between the two.
Comment 18•9 months ago
|
||
This is intended to convey the part of the image that is decoded so that only that part is drawn because the region that is not decoded yet will contain opaque white (for opaque images).
Comment 19•9 months ago
|
||
Does this patch provide the decoded rect for webrender to use in a suitable way?
Comment 20•9 months ago
|
||
That seems like it should provided the needed information.
Comment 21•9 months ago
|
||
Next step here is for someone to write the webrender half of this which uses the information on which part of the surface represents the partially decoded image so that only that part of the surface is drawn. Similar to what imgFrame::SurfaceForDrawing does in the aDoPartialDecode case
Comment 22•9 months ago
|
||
I'll unassign so that this is open for someone to come in for the webrender part.
Comment 23•8 months ago
|
||
Waiting on webrender cycles.
Updated•8 months ago
|
Comment 24•8 months ago
|
||
Flagging this report as stalled until we have the cycles to work it. Please remove the keyword when actively addressing it.
Updated•3 months ago
|
Comment 25•1 month ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #21)
Next step here is for someone to write the webrender half of this which uses the information on which part of the surface represents the partially decoded image so that only that part of the surface is drawn. Similar to what imgFrame::SurfaceForDrawing does in the aDoPartialDecode case
This sounds ideal, but what if we just send transparent pixels? Would it be easier as it sounds or would it be actually hard too?
Comment 26•1 month ago
|
||
We can't send transparent pixels because we have opaque images which we put in opaque surfaces which have to contain opaque pixels because skia needs that for some reason.
Comment 27•1 month ago
|
||
Hmm. How much perf increase do we get by using opaque surfaces? Maybe a bit more extra memcopies? Would it be terrible to use non-opaque ones?
Comment 28•1 month ago
|
||
If rasterizing images on the GPU, a very significant performance increase. A reasonable rule of thumb (depends on lots of factors, of course) on older Intel integrated GPUs (typically our low end) is that rasterizing with blend enabled is ~an order of magnitude slower than the cost of rasterizing opaque pixels.
Updated•1 month ago
|
Description
•