Closed Bug 896249 Opened 11 years ago Closed 10 years ago

Linux rendering error: images twitch after loaded

Categories

(Core :: Web Painting, defect)

21 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: markus.xp, Assigned: roc)

References

Details

(Keywords: regression)

Attachments

(1 file)

If a page is loaded which contains scaled images, certain images "twitch" for a split second once the page is loaded when using Firefox on any Linux OS.

Steps to reproduce:
1. open up a page with an affected image: i.e. https://yande.re/post?tags=id%3A261695 or http://konachan.com/post?tags=id%3A163825
2. take a close look at the images once the page is loaded, they twitch for a split second
3. you may switch tabs back and forth to reproduce it, as it always happens when you switch back to a tab with such images.

For better illustration, here are 2 screen recordings for the pages mentioned above:
http://i.imgur.com/TNqOQRr.gif and http://i.imgur.com/si8bNfF.gif
(The gif animations are an endless loop of the twitch, which actually only happens once)

Note: the issue is not exclusive to the sites mentioned. You may also try different Google image searches, where the issue sometimes is much more evident, due to the amount of images affected by the twitching. I chose the above sites to easily pin down the links to affected images.

Some facts:
1. I reproduced it on the following systems: Xubuntu 13.04 on desktop with nvidia GTX 660 (propr. driver), Xubuntu 13.04 on MacBook Air (Intel HD 4000) and Linux Mint 14 on an Asus notebook (Intel HD 3000); all systems x86_64
2. I remember having this issue for a while on Linux, so I'm quite sure it affected prior versions of Firefox and other Linux distros as well
3. it always happens to the same specific images, regardless of the device used
4. it does not happen with Firefox on Windows or OS X, also it does not happen with Chromium on Linux
5. presumably it is related to images being scaled. On Google image search you can enlarge them by hovering. On the 2 sites I linked above, you can enlarge them by pressing Shift on the keyboard while hovering them.
I'm not able to repro the issue with FF22 on Win 7.
Could you test with a clean profile, please.
https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

In addition, try with HWA disabled:
https://support.mozilla.org/en-US/kb/forum-response-disable-hardware-acceleration
Component: General → Layout: Images
Flags: needinfo?(markus.xp)
Product: Firefox → Core
As stated in the bug summary, it does not happen on Windows nor OS X. It is a Linux specific rendering issue.

A clean profile does not get rid of the issue.

Disabling HWA has no effect either.
Flags: needinfo?(markus.xp)
I've been seeing this for many months now in Windows 8. I never see it when pages load, but when I switch back to a tab, the affected image will twitch. Unlike M4he's first GIF, the image does not change dimensions: the image appears to distort horizontally like a hall of mirrors effect, without changing its size. Sometimes I'll get two twitches in rapid succession.

I always blamed Google Images for doing something weird, but now I've seen it on another site, it's clearly Firefox.

My suspicion (to which I arrived separately, before I read that M4he thinks the same) is that the cause is inline scaling: when Firefox is dynamically scaling an image to the size set in the HTML tag, it seems to go through some sort of process where the image is redrawn several times in a row, with some steps drawing it incorrectly.

I have just confirmed that the site where I'm seeing it now -- the top image here: http://park8.wakwak.com/~kaineko2/keyboard/album20110107.html -- does indeed set the image size in HTML to be significantly smaller than the image itself. The second image is NOT affected, despite also being scaled down. At a guess, it's some of off-by-one issue with the scaling that only applies certain reduction ratios.

Google Images is likely to be also making heavy use of inline scaling, and the examples from M4he are the same: right-click, View Image and you see a larger image, that is being scaled on the fly.

I have an AMD Radeon HD 7570 and all hardware acceleration is being blocked for the driver (despite being a brand new PC). I have Firefox 22 in 64-bit Windows 8.
Attached file 896249.html (testcase)
There are 2 issues:

1) After the image has just loaded, there is a kind of scaling immediately applied to the image.
Regression range:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=dac5700acf8b&tochange=cb573b9307e5
See bug 795940.

2) After this scaling, there is an ephemeral twitch.
Regression range:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=605ae260b7c8&tochange=dccab70d8554
See bug 504071.

Workaround: image.high_quality_downscaling.enabled = false
Blocks: 795940, 504071
Component: Layout: Images → Layout: View Rendering
Keywords: regression
Version: 22 Branch → 21 Branch
Assignee: nobody → roc
Just updated to Firefox 23.0 on my Xubuntu system and I don't see this issue anymore. Neither with the mentioned samples nor on Google's image search.
Looking good for me too -- not seeing this bug in Firefox 23!
Resolving as WORKSFORME per comments 5 and 6.  (Note that comment 5 was the bug reporter).

Though, see also bug 1013224, which affects trunk & seems related.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
See Also: → 1013224
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: