Sunday 12 September 2010
"Full Hardware Acceleration"
Microsoft marketing is making noises about IE9 having a monopoly on "full hardware acceleration". They're wrong; Firefox 4 has all the three levels of acceleration they describe. It's surprising they got this wrong, since Paul Rouget published a great overview on hacks.mozilla.org a few days ago (and our plans, source code, and nightly builds have been public since we started working on this stuff many months ago).
One of the messages of their post (and other IE9 marketing materials) is that a browser that only works with D3D and D2D will be superior to one that works on more platforms (e.g. having the option to use GL or D3D for compositing), because they need less of an abstraction layer. They're probably thinking of Chrome, which is basing everything on GL and using ANGLE to map GL to D3D for Windows. We also have an abstraction layer --- which we call "Layers" --- with D3D9, GL and "non-accelerated" implementations, but it's a lot higher-level than GL/ANGLE. (And of course we already have cairo for the content-rendering phase.) It's certainly true that only having to target Vista and Windows 7 would mean less development effort, but an extra abstraction layer need not hurt performance --- if you do it right. I personally like our approach so far; we have to write similar code for GL and D3D often, but having a D3D-specific layers backend makes it easier to integrate D3D-specific features --- like D2D!
I'm pretty confident that our architecture will not cause us any performance disadvantages vs IE9. On the other hand, our architecture does let us deliver D3D acceleration for Windows XP users --- which is still a very large market. I'm surprised Microsoft has been prepared to just hand XP users over to Firefox and Chrome (all those not captive to IE6, at least). Our architecture also lets us deliver GL acceleration for Mac, X, and mobile devices, which is very important.
When we started pushing on Layers at the beginning of the year, I had no idea we'd end up going toe to toe with Microsoft like this. It's exciting!
BTW "full hardware acceleration" is a bogus phrase. All browser pick and choose how to use the GPU, and more use of the GPU isn't necessarily better. There are certainly things no browser is ever going to "hardware accelerate" ... e.g. CSS margin collapsing :-).
In Microsoft's favour, I want to point out that although GPU acceleration for Web graphics isn't going to be a coup for IE9, it is going to be a coup for Windows. As far as I know there simply isn't anything comparable to D2D for GL at this time. (If there was, we'd use it!) cairo-gl is the closest thing I know of that we'd want to use, and but it doesn't seem ready yet. Apple has Quartz 2D Extreme, but they don't enable it for their own apps so one has to assume it's not a clear win. So, kudos to Microsoft for creating D2D, backporting it to Vista, and making it awesome. The free software world really needs to get behind cairo-gl (or something comparable) in a big way. I'd love to have some Mozilla people on it, but we're pretty busy... I'm sure we'd consider funding someone else to work on that stuff, though!
Comments
Since I see bugs 593361 and 593268 marked as fixed, I wonder is this is known. I also wonder what prompted the change that caused this speed loss, as I see no difference in rendering quality, and no speed increase anywhere.
One last thing. This whole "hardware-accelerated canvas". Canvas is immediate, so I'm assuming on hardware failure (or just driver updates, or maybe hibernation, fast user switching, or even sleep), canvas surfaces could get corrupted and then there wouldn't be a way to restore them (except reloading the page). Is this correct? It also sucks they waste power continuously regardless of visibility.
Keep up the good work!
I'm not sure what the story is for canvas buffers resiliency. I'm not sure what you mean about "wasting power".
Why is D3D turned on when Direct2D is available? It is my understanding retained layers already worked in Direct2D. Maybe it's for WebGL?
The "wasting power" meant that the browser has to honor draw requests to canvas even when they're not visible.
Uhh.. OpenVG?
No, I know support isn't great yet but people are just as well "getting behind" it than cairo-gl.
robert.
Jonathan: cairo-gl would fit right into our architecture, but it's just not fast enough to use last time I saw numbers. If it just got faster, we could use it.
Robert: what GPUs+platforms have OpenVG drivers at the moment? Pretty much every non-Microsoft device with a GPU supports GL. I'd heard that OpenVG support was a lot less widespread, but I'd gladly welcome a correction on that.
chris: not sure exactly what you're talking about.
For 25 years or more, this concept has existed and worked well in gui toolkits etc but now we have to throw it out with nothing better?
Congratulations. Why oh why does the current generation of retards insist on the devolution of technology? I see it everywhere these days. 98% of laptops sold these days have only 1360x768 screens. iPhones/iPads threw away multitasking.
firefox 4 is to have even less configuration options.
all you people do is remove features and add a glossy look and then applaud yourselves. it's just pathetic. If HTML5 was also designed so badly, no wonder no-one will support it.
https://bugzilla.mozilla.org/show_bug.cgi?id=594325
I know its a bug of Microfost, but I can't imagine mozilla shipping firefox 4 with this bug while still being responsible for users' eyesight. Its not goona work.
It seems that cairo-drm is already faster -even though probably currently only available on Intel i915-i965 GPUs (so including Atom Netbooks/Tablets etc.!)
Older benchmarks:
http://ickle.wordpress.com/2009/08/19/more-performance-wip/
If could be worth it to implement experimental cairo-drm and/or cairo-gl Backends if it fits nice, naturally after work on 4.0 is done.
That way people can play with it and it may even accelerate the development of cairo-drm/gl