Closed Bug 748922 (pixelated) Opened 10 years ago Closed 10 years ago

Background images are drawn with nearest sampling instead of bilinear

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(blocking-fennec1.0 -)

RESOLVED FIXED
Tracking Status
blocking-fennec1.0 --- -

People

(Reporter: aaronmt, Assigned: jrmuizel)

References

Details

(Whiteboard: [gfx])

Attachments

(1 file)

Amazon.com: XUL and Chrome have graphics that look anti-aliased -- native is all pixelated. What's up with that?

--
Samsung Galaxy SII (Android 4.0.2)
Nightly (04/25)
20120425085222
http://hg.mozilla.org/integration/mozilla-inbound/rev/99649652cb34
Whiteboard: [gfx]
This is us choosing to do nearest-neighbour scaling of background images, not linear.
George, what were our numbers from switching to nearest neighbour? We are considering making it tegra-only, but we want to see performance numbers, both tegra and non-tegra, first.
Assignee: nobody → gwright
Jeff should have the numbers, I believe.
no code changes wanted yet, but we need to investigate this before we got to beta
blocking-fennec1.0: ? → beta+
Summary: Graphics (PNG?) missing anti-aliasing → Background images are drawn with nearest sampling instead of bilinear
We discussed about using bilinear for background image that aren't getting tiled. This should fix these cases yet still give us wins for tiled backgrounds.
Blocks: 741224
Assignee: gwright → jmuizelaar
Jeff is going to finalize the plan for dealing with this.
(In reply to Benoit Girard (:BenWa) from comment #5)
> We discussed about using bilinear for background image that aren't getting
> tiled. This should fix these cases yet still give us wins for tiled
> backgrounds.

I just profiled cnn.com and it seems that none of the images that show up in the profile are tiled.
Jeff what's the expensive images? I see lots of cheap 1px scaling.
(In reply to Andreas Gal :gal from comment #8)
> Jeff what's the expensive images? I see lots of cheap 1px scaling.

I only profiled in aggregate, I don't have numbers for individual images. I'll try to get this.
One of the expensive images is http://i.cdn.turner.com/cnn/.e/img/3.0/global/shade/cnn_shdcamtt1.990px.bg.gif

FWIW, just as a data point switching to nearest, moves us from 46% background painting to 23.9% background painting on a phone with NEON
Top Mobile Website comparison against Chrome Beta [1] -- you can see most sites using background images are affected (e.g, Pinterest is nasty)

[1] http://people.mozilla.com/~atrain/mobile/Evangelism/ron-top-mobile-0430/
(In reply to Aaron Train [:aaronmt] from comment #11)
> Top Mobile Website comparison against Chrome Beta [1] -- you can see most
> sites using background images are affected (e.g, Pinterest is nasty)
> 
> [1] http://people.mozilla.com/~atrain/mobile/Evangelism/ron-top-mobile-0430/

Thanks, this comparison is very useful.

I looked at Pinterest and a few similar 'worse case'. It appears that chrome is being served a higher resolution version of the image. The difference we are seeing isn't a scaling difference between nearest/bilinear. Either chrome is using another sampling method or they are being served something different.

We should cache one of these pages offline and compare. That way we can be sure we're being served the same page.
(In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> (In reply to Benoit Girard (:BenWa) from comment #5)
> > We discussed about using bilinear for background image that aren't getting
> > tiled. This should fix these cases yet still give us wins for tiled
> > backgrounds.
> 
> I just profiled cnn.com and it seems that none of the images that show up in
> the profile are tiled.

I looked more closely and this appears to be wrong. When you look at cnn.com the images that take a long time are tiled. I made this original observation based on the status of doTile gfxUtils::DrawPixelSanpped and I'm still not sure why that doesn't match what the page is doing. I will look further.
Depends on: 750598
We are minusing this in favour of bug 750598. That may end up in this being a WONTFIX, but that can be a separate decision.
blocking-fennec1.0: beta+ → -
Duplicate of this bug: 750941
Duplicate of this bug: 752999
Alias: pixelated
Duplicate of this bug: 754020
Duplicate of this bug: 753985
Duplicate of this bug: 754123
This should be fixed now that bug 750598 is fixed.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.