Closed Bug 791855 Opened 12 years ago Closed 12 years ago

[azure] Cairo backend fails some image tests on Windows

Categories

(Core :: Graphics, defect)

15 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: nrc, Assigned: nrc)

Details

We're failing a bunch of reftests in reftest/tests/image/test/reftest/encoders-lossless/ (I think there is just one bug manifesting at all the different sizes). As shown by this Try push (which is for something completely different, ignore the other test failures): https://tbpl.mozilla.org/?tree=Try&rev=79d25c2b1723

These test failures don't show up because we use D2D (not Cairo) by default on Windows (other than XP, where this is not a problem). But we should fix this because we use Cairo for fallback on that platform.

My hunch is that there is an issue with D2D Cairo surfaces (which we've had before, e.g., bug 779650).

This is a regression since we have passed those tests before (when testing Azure/Cairo and for 779650), but I have no idea what has caused the regression.
I tried to reproduce using by Setting gfx.canvas.azure.backends;cairo and loading e.g. http://mxr.mozilla.org/mozilla-central/source/image/test/reftest/encoders-lossless/encoder.html?img=size-33x33.png&mime=image/png (tried the other Formats as well as they seem to have failed on the Try Push too) but each Image loads properly.

Is that the proper Way for trying to find a Regression Window at all?
(In reply to XtC4UaLL [:xtc4uall] from comment #1)
> I tried to reproduce using by Setting gfx.canvas.azure.backends;cairo and
> loading e.g.
> http://mxr.mozilla.org/mozilla-central/source/image/test/reftest/encoders-
> lossless/encoder.html?img=size-33x33.png&mime=image/png (tried the other
> Formats as well as they seem to have failed on the Try Push too) but each
> Image loads properly.
> 
> Is that the proper Way for trying to find a Regression Window at all?

I think that should work, yes. I assume you are on Windows Vista or later? Also check that gfx.canvas.azure.enabled=true. And in about:support, check that the azure backend is cairo, the layers backend is Direct3D10 and that Direct2D is not disabled.

To run the reftest, I would edit the reftest.list file in image/test/reftest/encoders-lossless/ so it only runs a few of the tests (otherwise it will take for ever), then run something like:

path/to/firefox.exe -P "azure" -no-remote -reftest file:///E:/Firefox/src/image/test/reftest/encoders-lossless/reftest.list > reftest.log

where you will need to change the file URL to properly point to the reftest.list file. And change "azure" to the name of the profile you use for Azure testing.

(Technically, you don't need to redirect the output, because it is logged somewhere anyway, but I find it easier this way).
It appears that SourceSurfaceD2D::GetDataSurface() is not implemented so Cairo can't draw a SourceSurfaceD2D.
ooo, I think I might have a patch for that...
(In reply to Nick Cameron [:nrc] from comment #4)
> ooo, I think I might have a patch for that...

Hmm, no, no patch for this. I guess this is kind of low priority, but we ought to fix it because it will bite us at some point, I'm sure.
Assignee: nobody → ncameron
On a more recent Try run, we are passing the image tests, but failing a bunch of others. It only happens when we use a Cairo canvas with D2D content (I think). Since we are not testing that configuration and it is not on by default on any platform, it seems pointless trying to stay on top of test fails here, so marking WONTFIX.

Try run: https://tbpl.mozilla.org/?tree=Try&rev=697f5f2caffc

I opened bug 801465 to fix SourceSurfaceD2D::GetDataSurface()
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.