As of tonight, Azure canvas is on by default on all platforms! The last platform to get turned on was Linux, for which Anthony Jones did a lot of work on performance to bring Azure canvas up to par with Thebes, and exceed it in some cases. In the next cycle we will get to remove Thebes canvas from the code-base altogether.
The flavour of Azure canvas you get depends on the platform: Firefox OS, Android, and Linux get Cairo, Mac gets Quartz, and Windows gets Direct2D, if you have Vista or 7, and your drivers are up to date, and your graphics card is not blacklisted; otherwise you get Cairo.
You can see which Azure backend you are getting for Canvas (and possibly content) in about:support. You can also see the fallback backend, this is used if for some reason the preferred backend cannot be used, usually for very large canvases which are larger than the maximum texture size for Direct2D.
You can change the canvas settings in about:config: gfx.canvas.azure.enabled should be true, you can force Thebes canvas by setting it to false (for now). gfx.canvas.azure.backends contains an ordered list of backend names, for example, "direct2d, skia, cairo". Your preferred backend is the first backend in that list which your platform supports. Your fallback backend is the first backend on that list which your platform supports, is not the preferred backend, and is Cairo (which means you might not have a fallback backend).
Windows XP when?
ReplyDeleteRunning the latest Nvidia 301.24 drivers and will update to the latest Nvidia 306.xx drivers when released next week or later this month.
What happens if Cairo isn't in your gfx.canvas.azure.backends list, and you encounter a large canvas?
ReplyDeleteAnonymous: if you are asking which backend you will get, then Cairo by default, you could also try Skia, but this is not yet a supported configuration (and may never be). If your drivers are up to date, you should get DirectX 9 layers, but that is separate from the Azure backend.
ReplyDeleteJesse: right now, it will fallback to Thebes canvas, in fact, if we can't use any backend in the preferred or fallback list, then we use Thebes canvas (so leaving backends blank has the same effect as setting enabled=false). We will have to decide what to do when we remove Thebes canvas.
ReplyDeleteI'll be watching for any reports of large jumps in memory consumption. Please do likewise! :)
ReplyDeleteIsn't Skia here to replace Cairo in the long term since Cairo uses fixed-point arithmetics?
ReplyDelete"The flavour of Azure canvas you get depends on the platform: Firefox OS, Android, and Linux get Cairo, Mac gets Quartz, and Windows gets Direct2D, if you have Vista or 7, and your drivers are up to date, and your graphics card is not blacklisted; otherwise you get Cairo."
ReplyDeleteSo who gets Skia then?
Anonymous: Skia might replace Cairo for some/all tasks, if the performance is better than Cairo. Currently we are getting mixed results - some things Cairo is better at, and some things Skia is. Skia seems to be developing more quickly at the moment. We need more (and better) data.
ReplyDeleteThe use of fixed or floating point is only one element in a whole bunch of stuff that affects performance
Dan: currently, nobody gets Skia by default. It has been tested on Windows and works there (but not if D2D is on, due to font issues). I think it has been tested on Android too, but not sure. We will switch to Skia if and when performance and stability is better on a given platform.
ReplyDeleteSkia is more correct than Cairo. Can be seen at this page. So please fix Skia.
ReplyDelete