Saturday, August 04, 2012

Azure canvas in Firefox nightlies

Over the past week or so, I've been landing patches by Anthony Jones, Matt Woodrow, and myself to get the Cairo and Skia backends working for Azure canvas. The latest nightly should have Azure/Cairo canvas on by default for Windows users without Direct2D, that is Windows XP users or later Windows users who don't have up to date drivers or have pref'ed off Direct2D or Direct3D 10 layers.

It would be great to find any bugs with these backends, so if you are in the mood, I would appreciate you experimenting with these canvas backends. Cairo has some known problems on Android, but as far as we know works perfectly elsewhere, Skia has only passed testing on Windows, but casual experimentation has shown it works pretty well everywhere, I think there are font problems on Android, but I'm not sure. To use these backends you need to set some prefs in about:config - azure canvas must be enabled (already the case on Windows and Mac), to do this set gfx.canvas.azure.enabled to true (note that there is also gfx.content.azure.enabled, unless you have Windows with Direct2D working, you almost certainly don't want to make this true). You then need to specify a backend for Azure canvases by setting gfx.canvas.azure.backends to "cairo" or "skia" (other options are "direct2d" or "cg" for core graphics). If you set this to an empty string, you will not get any backend and will get the old Thebes canvas. You can set multiple backends (e.g., "direct2d,cairo"), the front of the list has the highest priority. You will never get a backend that is not supported. (In the example, you will get direct2d if you are on recent Windows and have up to date drivers, cairo if not. If your canvas is too large for direct2d to handle, we will fallback to cairo canvas).

If you find any bugs please file a bug using bugzilla and cc me (:nrc). Thanks and have fun experimenting!

9 comments:

Anonymous said...

pdf.js finally works properly with Skia backend!

Anonymous said...

pdf.js finally works properly with Skia backend.

Anonymous said...

pdf.js finally works properly with Skia backend.

mayankleoboy1 said...

so which is the fastest for a Win7+ discrete GPU ?

Nick Cameron. said...

mayankleoboy1: almost certainly Direct2D (for which you will need your graphics drivers to be up to date).

Nick Cameron. said...

By which I mean Azure/Direct2D, Thebes canvas uses Cairo which uses the Direct2D backend, so there won't be much between them, but with D2D backend, Azure should be more efficent.

Unknown said...

Hello I found you by accident trying to remove Cairo from my Mozilla Firefox 19 address bar. This Cairo virus came with the download of Firefox 19. I removed the Cairo virus from the control panel,add ons,registry and about:config. To my dismay the Cairo Search virus is still attached to my address bar. I went to my graphics and Cairo when I tried to delete it I can not remove it. I went back and found AzureFallbackCanvasBackend. I decided to post what I had found.An e-mail to your company will follow. I NEED HELP removing the Cairo from both my laptop and my husbands. My graphics in windows eight is the last place I have seen the name Cairo. Please HELP.

Nick Cameron. said...

Judy - you could try Firefox reset - http://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-most-problems - it can usually fix this kind of problem. If it doesn't, you should be able to get more help on support.mozilla.org.

Noek said...

Everything else works but SUDDENLY I can no longer access the website (and thus my account) of my ISP - AXXESS.CO.ZA - on Firefox or Chrome (it times out) and the images on their e-mails to me no longer show even when I click on "Allow"