Bug 748922 (pixelated)

Background images are drawn with nearest sampling instead of bilinear

RESOLVED FIXED

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: aaronmt, Assigned: jrmuizel)

Tracking

Trunk
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking-fennec1.0 -)

Details

(Whiteboard: [gfx])

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 618409 [details]
Browser comparison (04/25) - Screenshot

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
(Reporter)

Updated

6 years ago
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+
(Assignee)

Updated

6 years ago
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

Updated

6 years ago
Assignee: gwright → jmuizelaar

Comment 6

6 years ago
Jeff is going to finalize the plan for dealing with this.
(Assignee)

Comment 7

6 years ago
(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.

Comment 8

6 years ago
Jeff what's the expensive images? I see lots of cheap 1px scaling.
(Assignee)

Comment 9

6 years ago
(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.
(Assignee)

Comment 10

6 years ago
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
(Reporter)

Comment 11

6 years ago
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.
(Assignee)

Comment 13

6 years ago
(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.
(Assignee)

Updated

6 years ago
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+ → -
(Reporter)

Updated

6 years ago
Duplicate of this bug: 750941
Duplicate of this bug: 752999
(Reporter)

Updated

6 years ago
Alias: pixelated
(Reporter)

Updated

6 years ago
Duplicate of this bug: 754020
(Reporter)

Updated

6 years ago
Duplicate of this bug: 753985
Duplicate of this bug: 754123
(Assignee)

Comment 20

6 years ago
This should be fixed now that bug 750598 is fixed.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.