Black Line appears next to gif and png images

Bug #263661 reported by TonyC
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Medium
firefox (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: firefox-3.0

A few of my web sites, when viewed after upgrading to firefox-3.0 (on Ubuntu 8.04), display a vertical black line next to some GIF images (created in Gimp). The only time I see this line is next to 1 pixel wide images stretched (used as spacers). I noticed that after stretching past a specific width (different for the each occurrence) a 1 pixel wide black line would appear just next to the GIF. It would appear sometimes to the left, sometimes to the right, depending on the stretched width of the image.

I was able to remedy this by using 3 shorter width images instead of one long width image, but this is obviously not a real fix. Please note that same sites did not show this black line before upgrading to firefox-3.0.

----
Package details:
firefox-3.0:
  Installed: 3.0.1+build1+nobinonly-0ubuntu0.8.04.3
  Candidate: 3.0.1+build1+nobinonly-0ubuntu0.8.04.3
  Version table:
 *** 3.0.1+build1+nobinonly-0ubuntu0.8.04.3 0
        500 http://security.ubuntu.com hardy-security/main Packages
        500 http://archive.ubuntu.com hardy-updates/main Packages
        100 /var/lib/dpkg/status
     3.0~b5+nobinonly-0ubuntu3 0
        500 http://archive.ubuntu.com hardy/main Packages

ProblemType: Bug
Architecture: i386
Date: Mon Sep 1 09:44:58 2008
DistroRelease: Ubuntu 8.04
NonfreeKernelModules: nvidia
Package: firefox-3.0 3.0.1+build1+nobinonly-0ubuntu0.8.04.3
PackageArchitecture: i386
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: firefox-3.0
Uname: Linux 2.6.24-21-generic i686

Tags: apport-bug
Revision history for this message
TonyC (tony-cola) wrote :
Revision history for this message
Richard Seguin (sectech) wrote :

Thank you for reporting this issue and trying to make Ubuntu better...

Could you please provide the links to the websites your referring to? I would like to test it on my system

Thanks,

Richard Seguin

Revision history for this message
Richard Seguin (sectech) wrote :

* Marking incomplete pending enough information to complete triage

Changed in firefox-3.0:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
TonyC (tony-cola) wrote : Re: [Bug 263661] Re: Black Line appears next to gif images

There is only one site currently live, the rest are on my local box.
The live site (which has been modified so as to work around the bug)
is:

http://www.affordable-cleaning-services.com/index.php

The view the bug, simply change:

[html]
   <img src="images/main01.gif" width="100" height="103"
   ><img src="images/main01.gif" width="100" height="103"
   ><img src="images/main01.gif" width="100" height="103"
   >
[/html]

To:

[html]
   <img src="images/main01.gif" width="300" height="103"
   >
[/html]

Please let me know if you have any further questions. Thank you for
your time and attention.

Tony Colacchio

Revision history for this message
Brent Yorgey (byorgey) wrote : Re: Black Line appears next to gif images

I am also seeing this bug. In particular I can see it on this post:

http://www.mathlesstraveled.com/?p=147

as well as on other posts on the same site. Note the comments on the above post with people reporting whether they see the black bar next to the GIF image, and their browser and OS. From a preliminary look over the comments it seems to only happen with Firefox 3.0.1 on certain platforms. I personally am seeing this issue with Firefox 3.0.1 on Ubuntu 8.04. Let me know if there is any additional information I can provide.

Revision history for this message
In , Zweinberg (zweinberg) wrote :

Created an attachment (id=351955)
test case

The attached test case takes an 1x2 pixel image and stretches it horizontally to several hundred pixels wide, several times (with different stretch distances). On Linux, some of the green lines will show black dots at the far right. If you change the zoom level, the dots change size jump from one line to another, and at some zoom levels there are also black lines at the bottom of each image. I have anecdotal reports that similar image artifacts are highly visible with Ubuntu 8.10's build of Firefox 3.0.x (not sure which point revision) when playing the browser-hosted game at www.kingdomofloathing.com, so this is not merely a problem for contrived test cases.

The artifacts arise because, on Linux, we are trying to avoid the use of the CAIRO_EXTEND_PAD source filter because it takes a slow fallback path. Instead, we use nearest-neighbor image scaling, on the theory that that will never sample pixels outside the image. As this test case demonstrates, that theory is incorrect.

I will shortly attach a patch which uses EXTEND_PAD universally and modifies the Cairo library to turn on accelerated handling of this mode when the X server supports it. (Render protocol 0.10 - available in X.org server 1.5 - includes support for EXTEND_PAD and it appears to work when I make the library aware of it.) I'd be happy to see a fix that don't involve a major performance hit on older X servers but I have been unable to think of one.

(I suspect this test case, or a slight modification, will also show artifacts at some zoom levels on Mac, because we are also not using EXTEND_PAD there - in that case not for performance but because someone had the erroneous impression that EXTEND_PAD is the default on Mac. Code inspection suggests that Cairo does implement EXTEND_PAD correctly and speedily on Mac.)

Revision history for this message
In , Zweinberg (zweinberg) wrote :

Created an attachment (id=351956)
proposed patch (incl Cairo changes)

Here's the patch as described above. Reftest run in progress.

Revision history for this message
In , Vladimir Vukicevic (vvuk) wrote :

(From update of attachment 351956)
Looks fine, except for:

>+ pattern->SetExtend(gfxPattern::EXTEND_PAD);

This shouldn't be done on OSX; the quartz surface behaves slightly differently and PAD will cause us to take a slow path.

Also, make sure you do the cairo patch bit -- add the patch file itself to gfx/cairo and edit gfx/cairo/README to reference it, or it'll get blown away next cairo upgrade. Jeff or I will upstream it when we can.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

I seem to recall problems with PAD being buggy in the X server, but I don't remember any details. I guess if reftests pass that's a pretty good sign, but how confident are we about the various server/driver combinations? Does Carl know?

I basically like the patch but I'd like to see a new version addressing Vlad's comments. Also, what does returning UNSUPPORTED actually cause cairo to do here?

Revision history for this message
In , Zweinberg (zweinberg) wrote :

(In reply to comment #2)
> >+ pattern->SetExtend(gfxPattern::EXTEND_PAD);
>
> This shouldn't be done on OSX; the quartz surface behaves slightly differently
> and PAD will cause us to take a slow path.

It's necessary. I haven't tried this exact testcase but I can reproduce visual artifacts on OSX without it. Also, looking at cairo-quartz-surface.c, it doesn't seem to take a fallback for EXTEND_PAD, only EXTEND_REPEAT/REFLECT.

> Also, make sure you do the cairo patch bit -- add the patch file itself to
> gfx/cairo and edit gfx/cairo/README to reference it, or it'll get blown away
> next cairo upgrade. Jeff or I will upstream it when we can.

Ok.

(In reply to comment #3)
> I seem to recall problems with PAD being buggy in the X server, but I don't
> remember any details. I guess if reftests pass that's a pretty good sign, but
> how confident are we about the various server/driver combinations? Does Carl
> know?

For the record, I see no regressions in the reftests with this change, but the reftest included in the patch fails -- still analyzing. I think it's an accident of how I wrote the test.

> I basically like the patch but I'd like to see a new version addressing Vlad's
> comments. Also, what does returning UNSUPPORTED actually cause cairo to do
> here?

The failure propagates to _cairo_surface_composite in cairo-surface.c which then calls _cairo_surface_fallback_composite -- so the rendering is the same, but without X-server acceleration.

Revision history for this message
In , Vladimir Vukicevic (vvuk) wrote :

(In reply to comment #4)
> (In reply to comment #2)
> > >+ pattern->SetExtend(gfxPattern::EXTEND_PAD);
> >
> > This shouldn't be done on OSX; the quartz surface behaves slightly differently
> > and PAD will cause us to take a slow path.
>
> It's necessary. I haven't tried this exact testcase but I can reproduce visual
> artifacts on OSX without it. Also, looking at cairo-quartz-surface.c, it
> doesn't seem to take a fallback for EXTEND_PAD, only EXTEND_REPEAT/REFLECT.

I can't reproduce with this testcase; no black or anything but green shows up. As you say, PAD is ignored anyway (incorrectly, I guess, but correctly for perf). So there's a separate bug there, I think.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Yeah, if there's a Mac problem, let's handle that under a separate bug.

Revision history for this message
In , Zweinberg (zweinberg) wrote :

(In reply to comment #5)
> > I haven't tried this exact testcase but I can reproduce visual
> > artifacts on OSX without it. Also, looking at cairo-quartz-surface.c, it
> > doesn't seem to take a fallback for EXTEND_PAD, only EXTEND_REPEAT/REFLECT.
>
> I can't reproduce with this testcase; no black or anything but green shows up.
> As you say, PAD is ignored anyway (incorrectly, I guess, but correctly for
> perf). So there's a separate bug there, I think.

PAD is not ignored on OSX. I have empirical evidence that it does *something*, and my impression from reading the code is that it is implemented with acceleration. Compare the rendering of reftests/border-image/solid-image-2.html at all zoom levels with these two builds:

https://build.mozilla.org/tryserver-builds/2008-12-02_11:<email address hidden><email address hidden>

https://build.mozilla.org/tryserver-builds/2008-12-05_17:<email address hidden><email address hidden>

At some zoom levels (reportedly not the default, though) you should see gaps in the borders with the first, but not the second. The only difference is that the second one sets EXTEND_PAD for quartz surfaces. (Note that both builds have other patches in them -- you should *not* see gaps in the border with a trunk build.)

Given that the mitigating change is in a shared code path for all images, I am certain it is possible to construct a test case that doesn't use border-image but nonetheless fails on OSX, but I have to leave it to someone who actually has a Mac.

I don't see any value in splitting the bug. It is the same bug on both Mac and Linux - we need to be using EXTEND_PAD and we're not.

Revision history for this message
In , Zweinberg (zweinberg) wrote :

(In reply to comment #4)
> For the record, I see no regressions in the reftests with this change, but the
> reftest included in the patch fails -- still analyzing. I think it's an
> accident of how I wrote the test.

Bad news: the reftest failure in the patch seems to be caused by going back to whatever Cairo's default is for resampling on image upscale. With the patch as posted, the test file's images are rendered with a very slight color gradient: at about one-third of the way across each image, the white stripe changes from #ffffff to #fbfffb, and at about two-thirds across, the green stripe changes from #00ff00 to #04ff04. This does not happen if I leave in the call to pattern->SetFilter(0).

I'd be interested to know if this test fails in Windows and Mac builds.

Revision history for this message
In , Zweinberg (zweinberg) wrote :

... I can reproduce the equivalent of the reftest failure with code that uses only the patched cairo library, and the failure goes away if I take the patches out of cairo. + some web searches turned up other cases where RepeatPad in Render just plain doesn't work.

This makes me a lot less sanguine about the whole idea. :-(

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Can you paste some links here which refer to specific problems we should watch out for the next time we think about enabling PAD on GTK?

Revision history for this message
In , Zweinberg (zweinberg) wrote :

http://lists.freedesktop.org/archives/xorg/2008-February/032973.html has a test program that fails catastrophically for PAD and REFLECT (or rather, the Render equivalents) on my desktop computer (ATI graphics) and for REFLECT, but not PAD, on my laptop (Intel graphics). Which has the lovely implication that this is not just about the Render implementation, but about which specific video driver you've got...

I'll attach the test program I wrote tomorrow, when the desktop is on again.

Any thoughts on how to proceed here?

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

No suggestions here other than "mark some tests random on GTK and hope things get better someday"

Revision history for this message
In , Vladimir Vukicevic (vvuk) wrote :

wanted1.9.1 is dead

Revision history for this message
In , Zweinberg (zweinberg) wrote :

Created an attachment (id=353263)
"stretch single pixel" cairo-only test case

I promised to attach this test case, which demonstrates bugs in X Render (you need to use it with a Cairo library patched to try to use RepeatPad for CAIRO_EXTEND_PAD).

Revision history for this message
Richard Seguin (sectech) wrote : Re: Black Line appears next to gif images

This bug is quite dated, do we know if it is still an issue?

Revision history for this message
TonyC (tony-cola) wrote : Re: [Bug 263661] Re: Black Line appears next to gif images

I just tested and am still seeing the black line on a fully updated ubuntu
install.

On Dec 24, 2008 10:32 AM, "Richard Seguin" <email address hidden>
wrote:

This bug is quite dated, do we know if it is still an issue?

-- Black Line appears next to gif images
https://bugs.launchpad.net/bugs/263661 You received this ...

Revision history for this message
Richard Seguin (sectech) wrote : Re: Black Line appears next to gif images

I realize that you gave us the specs to change on that webpage, do you know of any other sites that produce this issue? What I'll do is play around with it until I can see the same thing and try and work backwards from there.

Revision history for this message
In , Zweinberg (zweinberg) wrote :

I think there is a way to get consistent cross-platform rendering without sacrificing too much performance. The common case is that images are not scaled, and post-bug 296818, we don't even keep them around in memory in uncompressed form. So that says to me that we could treat images in display memory as a pure cache, and in particular, we could do all the scaling on the client side before copying to display memory. That would mean that it's our copy of pixman doing all the work, so we know it's correct, but there wouldn't be any need to pull the image data off the X server, rescale it, and put it back, like what happens now if you enable EXTEND_PAD on Linux.

We *would* create offscreen bitmap surfaces for the scaled images so that as long as the nsThebesImage object sticks around, repaint doesn't have to repeat the scaling work. I think this might even make scrolling of a scaled document faster, because right now we're scaling everything on every draw operation.

I'm reluctant to implement this before joedrew!'s rumored image layer cleanups land, because right now it's such a horrible mess in there, but I'm willing to make an attempt at it if those are not happening anytime soon.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

We used to do things that way. We stopped. Better people than I can explain why.

Revision history for this message
In , Vladimir Vukicevic (vvuk) wrote :

I think that's what we want to get to, once we get to being able to do decode-on-draw. It's not a great solution right now though, because we don't want to cache all scaled images since they can become quite large; you can toss in a limit, and then you're back to having to scale on demand, which means having to keep the original bits around. It also means that if hardware does accelerate the scaling, that we'd lose any access to that; for example, if the native image representation is a GL texture.

But, I think that we should be able to at least partially do it the way you describe... I think the missing piece is decode-on-draw, so that we can better manage memory usage.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

I don't understand ... how is decode-on-draw going to work with scaled images? How can you pre-scale the compressed data?

Revision history for this message
In , Vladimir Vukicevic (vvuk) wrote :

Just so that we have a way to request the image to get redecoded from within the code that does the final rendering, to avoid having to keep different decoded regions in memory at all times.

Revision history for this message
Faceleg (faceleg) wrote : Re: Black Line appears next to gif images

This site (my site) produces the issue.

http://pagesofinterest.net

Revision history for this message
Richard Seguin (sectech) wrote :

I just viewed that the site provided in the above post and it rendered fine for me. I am almost wondering if this might be a graphics driver issue.

If either one of you could provide information on your hardware and what graphics driver your running it might provide us with some clues. I know with some low end graphic cards you sometimes run into graphic issues, or sometimes a strange screen resolution, but then you wouldn't only be concerned with firefox and have it happening "some" of the time.

At this point I think it might be wise to request some hardware information:

# uname -a > uname-a.log
# cat /proc/version_signature > proc_version_signature.log
# sudo lspci -vvnn > lspci-vvnn.log (those are 2 v's not a w)

Also the make and model of your video card would be helpful.

Revision history for this message
David Eisner (deisner) wrote :

I'm also experiencing this problem on many websites, including http://pagesofinterest.net/. I'll add the hardware information Richard requested, as well as a screen capture. I'm using a Dell Inspiron 700m with an Intel 855GM graphics chipset.

Revision history for this message
David Eisner (deisner) wrote :
Revision history for this message
David Eisner (deisner) wrote :
Revision history for this message
David Eisner (deisner) wrote :
Revision history for this message
David Eisner (deisner) wrote :

Another data point: I don't see the black line issue when I use the daily Chromium build for Ubuntu.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

*** Bug 477552 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Zweinberg (zweinberg) wrote :

*** Bug 499308 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Zweinberg (zweinberg) wrote :

*** Bug 467832 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

*** Bug 487996 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Zweinberg (zweinberg) wrote :

*** Bug 460989 has been marked as a duplicate of this bug. ***

Richard Seguin (sectech)
Changed in firefox-3.0 (Ubuntu):
status: Incomplete → Invalid
affects: firefox-3.0 (Ubuntu) → firefox (Ubuntu)
Changed in firefox (Ubuntu):
status: Invalid → Confirmed
36 comments hidden view all 116 comments
Revision history for this message
In , Joe-drew (joe-drew) wrote :

Yes, we're listening. This blocks 1.9.3 final, which means it'll be fixed for Firefox 4 final.

A plan Jeff and I sketched out involves (IIRC):
 - Turning on EXTEND_PAD unconditionally, and
 - using and/or extending the Cairo X version checking code to sniff for the versions of X that EXTEND_PAD sucks on, and falling back to software (pixman) in those cases.

That might not be the final plan, but it's *a* plan.

Revision history for this message
In , Barry de Graaff (barrydegraaff) wrote :

OK thanks Joe. I is nice to hear that it is fixed for Firefox 4. I will keep monitoring this till than. If there is anything else I can do let me know.

Revision history for this message
In , Mozaakash (mozaakash) wrote :

*** Bug 586241 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Karlt (karlt) wrote :

FWIW, attachment 351955 shows the background instead of black when using operator-over instead of overriding with operator-source here:

http://hg.mozilla.org/mozilla-central/annotate/0df95f3a6de6/modules/libpr0n/src/imgFrame.cpp#l631

That may often be a little better though still not right, and there are other reasons to use extend-pad.

I'm curious whether the bug here is in calculating scale factors and clips or in the nearest neighbour implementation. However, extend-pad is probably the appropriate solution anyway.

Llynix (llynix)
summary: - Black Line appears next to gif images
+ Black Line appears next to gif and png images
Revision history for this message
In , duckien (wingofchao) wrote :

I believe EXTEND_PAD is enable for upscaled image in:
https://bugzilla.mozilla.org/show_bug.cgi?id=422179

However, I'm not sure about downscaled image.

Revision history for this message
In , Joe-drew (joe-drew) wrote :

Bug 422179 uses EXTEND_PAD if EXTEND_PAD is fast and good - but only for upscales. I suspect we should use EXTEND_PAD for downscales too, which will fix this bug once and for all. I have a patch which I think will do this.

Revision history for this message
In , Joe-drew (joe-drew) wrote :

Created attachment 497112
Use EXTEND_PAD on X

This patch is built on my patch in bug 566283, but the merge is pretty trivial.

Zack, can you take a look and see if this works?

Revision history for this message
In , Zack Weinberg (zackw) wrote :

Comment on attachment 497112
Use EXTEND_PAD on X

Tested <http://hg.mozilla.org/mozilla-central/rev/5d9e1a56d922> on my current Linux box: X server vendor release code 10707000, Nouveau driver 0.0.16, NV94 video chipset.

The test case in attachment 351955 shows display artifacts:

* with an unmodified tree;
* with joe's patches for this bug and bug 566283;
* and even with PreparePatternForUntiledDrawing chainsawed down to just

{
    aPattern->SetExtend(gfxPattern::EXTEND_PAD);
    aPattern->SetFilter(aDefaultFilter);
}

The artifacts are not the same as what I get with 3.6 on the same hardware. 3.6 shows thin green lines, all the same color throughout, some of which have solid black dots at their right edges; at some zoom levels there are also solid black lines underneath the green line (with a white pixel or two in between).

mozilla-central never produces the solid black dots at the right edges; however, the green lines are not all the same color throughout, they are the proper color in the middle, and fade to neutral gray at both edges. Some of the lines get black lines underneath them. And they all appear to be slightly fatter than they were in 3.6. This behavior is more or less the same regardless of whether any patches are applied (the patch seems to change subtleties of the artifacts).

It is plausible to me that this is a bug in nouveau, and honestly I think the correct course of action at this point is to nuke the entire mess, use EXTEND_PAD unconditionally, and then work with the Cairo and X driver folks to figure out what's still wrong and fix it properly. Nonetheless I cannot say that this patch fixes the original problem.

Revision history for this message
In , Zack Weinberg (zackw) wrote :

Created attachment 497346
rendering artifacts, m-c, zoom level 0

Revision history for this message
In , Zack Weinberg (zackw) wrote :

Created attachment 497347
rendering artifacts, m-c, zoom level 1

Revision history for this message
In , Zack Weinberg (zackw) wrote :

Replacing the entire body of PreparePatternForUntiledDrawing with

{
    aPattern->SetExtend(gfxPattern::EXTEND_NONE);
    aPattern->SetFilter(gfxPattern::FILTER_FAST);
}

reproduces the 3.6 behavior. Replacing it with

{
    aPattern->SetExtend(gfxPattern::EXTEND_PAD);
    aPattern->SetFilter(gfxPattern::FILTER_FAST);
}

produces behavior which is _nearly_ correct; the image itself is upscaled correctly (instead of being gradientified and fattened), and there aren't black lines under the image at any zoom level, but some of the lines still get black blobs at their right edges at some zoom levels, and also now sometimes at their left edges. However, this happens much less often.

Based on this I feel relatively confident in diagnosing a video driver bug, and my recommendation is still to rip out the entire mess and use EXTEND_PAD and a good filter unconditionally, then to work with the X.org folks to get the video drivers fixed.

Revision history for this message
In , Karlt (karlt) wrote :

(In reply to comment #51)
> Tested <http://hg.mozilla.org/mozilla-central/rev/5d9e1a56d922> on my current
> Linux box: X server vendor release code 10707000, Nouveau driver 0.0.16, NV94
> video chipset.

What pixman version was being used by the server here?

(The patch produces the correct results here with xorg-server 1.9.2.901 and xf86-video-ati 6.13.2, or a tigervnc based on xorg-server 1.7.6 and pixman-0.20.0.)

Revision history for this message
In , Zack Weinberg (zackw) wrote :

Xorg.0.log says:

# Build Date: 02 December 2010 01:10:32AM
# xorg-server 2:1.7.7-10
# Current version of pixman: 0.16.4

... which is pretty egregiously old, innit. Stay tuned.

Revision history for this message
In , Zack Weinberg (zackw) wrote :

I upgraded the shared pixman and cairo libraries on this computer to 0.21.2 and 1.10.0 respectively. Xorg.0.log indicates pixman 0.21 is in use. Same bad behavior with (or without) joedrew's patches.

The nouveau drivers are the next obvious culprit. They haven't been updated by this distro since 2010-08-25, but I really don't want to go to the trouble of building them myself (I'd have to build my own kernel as well).

Mike Hommey should have been cc:ed on this bug a long time ago. My bad. Any comments, Mike?

Revision history for this message
In , Mh+mozilla (mh+mozilla) wrote :

Using cairo 1.10.0 and pixmap 0.21.2, everything is displayed gracefully on 4.0b8 built against system cairo, on intel display. (iceweasel from http://mozilla.debian.net/packages/, and cairo and pixmap from current debian experimental, for those who care).

Nouveau drivers are likely to be the culprit.

Revision history for this message
In , Zack Weinberg (zackw) wrote :

Your system is nigh-identical to mine but for the video drivers, so yeah, that sounds pretty convincing. I am testing some random trunk revision from last week + the patches, though.

Who would I have to blackmail to get more recent Nouveau drivers into experimental?

Revision history for this message
In , Zack Weinberg (zackw) wrote :

Created attachment 499238
alternative patch: unconditional EXTEND_PAD

This is what I think should be done. Yeah, it means we're at the mercy of the video drivers on X11, but that gives us more leverage to kick the X people and the distros, and I don't like working around problems when we can fix them at source.

Incidentally, my tests were all with in-tree Cairo, but I've now tried --enable-system-cairo and it made no difference.

Revision history for this message
In , Mh+mozilla (mh+mozilla) wrote :

(In reply to comment #59)
> Who would I have to blackmail to get more recent Nouveau drivers into
> experimental?

You can try <email address hidden> directly, or file a wishlist bug against xserver-xorg-video-nouveau.

Revision history for this message
In , Zack Weinberg (zackw) wrote :

Regret to report that I still have display artifacts with the much newer Nouveau driver that just hit Debian experimental:

X.Org X Server 1.9.2.902 (1.9.3 RC 2)
Release Date: 2010-12-03
Current Operating System: Linux moxana 2.6.37-rc7-amd64
NOUVEAU driver Date: Tue Nov 30 15:27:36 2010 +1000

Revision history for this message
In , Joe-drew (joe-drew) wrote :

Comment on attachment 499238
alternative patch: unconditional EXTEND_PAD

I can't see myself being OK with this any time soon - there are too many people with old-enough X that unconditional EXTEND_PAD will hurt.

Revision history for this message
In , Zack Weinberg (zackw) wrote :

(In reply to comment #63)
> I can't see myself being OK with this any time soon - there are too many people
> with old-enough X that unconditional EXTEND_PAD will hurt.

In that case, and looking at the reports in comment 55 and comment 58, maybe we should go ahead with your patch. We certainly shouldn't be generalizing from my computer, which has display artifacts *with or without* your patch, that have been conclusively pinned on the video drivers (see https://bugs.freedesktop.org/show_bug.cgi?id=32855 ).

Revision history for this message
In , Karlt (karlt) wrote :

Comment on attachment 497112
Use EXTEND_PAD on X

>- if (fastExtendPad) {
>- aPattern->SetExtend(gfxPattern::EXTEND_PAD);
>- aPattern->SetFilter(aDefaultFilter);
>- } else
>-#endif
>- aPattern->SetFilter(gfxPattern::FILTER_FAST);
>+
>+ if (!isDownscale && !fastExtendPad) {
>+ aPattern->SetFilter(gfxPattern::FILTER_FAST);
> }
>+

Looks like an else block with SetFilter(aDefaultFilter) is needed.
Without this patch, that currently only happens when !isDownscale, but I expect it should also be done when !isDownscale, as on other platforms.

Otherwise, this approach of using EXTEND_PAD when supported by cairo seems sensible to me.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

What else needs to be done here?

Revision history for this message
In , Zack Weinberg (zackw) wrote :

Get joedrew's patch landed?

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Joe, is it ready to land?

Revision history for this message
In , Joe-drew (joe-drew) wrote :

Comment on attachment 497112
Use EXTEND_PAD on X

It needs review first, and maybe some rebasing.

Revision history for this message
In , Karlt (karlt) wrote :

Comment on attachment 497112
Use EXTEND_PAD on X

Is there a reason for ignoring aDefaultFilter? (Comment 65)

Revision history for this message
In , Kbrosnan-mozilla (kbrosnan-mozilla) wrote :

*** Bug 648234 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Karlt (karlt) wrote :

Created attachment 532740
use RepeatPad on newer X servers even when downscaling

This was based on Joe's attachment 497112, but restores the use of
aDefaultFilter when we use EXTEND_PAD and adds aDefaultFilter for downscale
with default extend.

There is also some code simplification. We now require cairo 1.10 so there is
no need to check the cairo version.

Revision history for this message
In , jasonq (jason-quinn) wrote :

*** Bug 572464 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Joe-drew (joe-drew) wrote :

Comment on attachment 532740
use RepeatPad on newer X servers even when downscaling

Review of attachment 532740:
-----------------------------------------------------------------

::: gfx/thebes/gfxDrawable.cpp
@@ +78,5 @@
> + case gfxASurface::SurfaceTypeQuartz:
> + case gfxASurface::SurfaceTypeQuartzImage:
> + // Don't set EXTEND_PAD, Mac seems to be OK. Really?
> + aPattern->SetFilter(aDefaultFilter);
> + break;

This hunk needs to be removed, as we've removed it with the Cairo update.

Revision history for this message
In , Karlt (karlt) wrote :
Revision history for this message
In , Mardeg-5 (mardeg-5) wrote :

*** Bug 490799 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mardeg-5 (mardeg-5) wrote :

*** Bug 513651 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mardeg-5 (mardeg-5) wrote :

*** Bug 497813 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Hskupin (hskupin) wrote :

Verified fixed with with Fennec 7.0a1 (20110620)

Revision history for this message
In , Fry-kun (fry-kun) wrote :

Not fixed when using canvas..drawImage
Example usage: http://demos.hacks.mozilla.org/openweb/HWACCEL/
Note: demo appears correct but runs slowly because it falls back to software rendering. I've verified with debug tracing that REPEAT_NONE is still used for that test case.

According to https://bugzilla.mozilla.org/show_bug.cgi?id=620065#c24, this bug should take care of that, but obviously didn't. Let me know if I need to file it separately.

Revision history for this message
In , Fry-kun (fry-kun) wrote :

P.S. tested using Aurora (7.0a2)

Revision history for this message
In , Zack Weinberg (zackw) wrote :

This bug is pretty long in the tooth, and by all accounts did fix the problem with <img>, so please file a new bug and mark it dependent on this one.

Changed in firefox (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
In , Ooo-saturn7 (ooo-saturn7) wrote :

This bug is still alive. I opened a new bug https://bugzilla.mozilla.org/show_bug.cgi?id=975358

Changed in firefox:
importance: Unknown → Medium
status: Unknown → Fix Released
Displaying first 40 and last 40 comments. View all 116 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.