IE9 Flaunts Hardware-Accelerated Canvas
An anonymous reader writes "Over on the IE blog they have a rundown of IE9's hardware accelerated support for the canvas element. They write, 'With the recent release of the latest IE9 platform preview, we talked about how we're rebuilding the browser to use the power of your whole PC to browse the web, and to unlock a new class of HTML5 applications. One area that developers are especially excited about is the potential of HTML5 canvas. Like all of the graphics in IE9, canvas is hardware accelerated through Windows and the GPU. In this blog post we discuss some of the details behind canvas and the kinds of things developers can build.'"
We developed a web based game BattleCell that uses Ajax/CSS instead of Flash for all the heavy lifting. We discover at least one new bug in the IE rendering engine every month. Our pile of IE bugs in the back room that we have to track every time we develop a new feature is testament to the dread with which we view this new hardware-based rendering engine. We know what we're doing.
Just last week, we learned that once you have a stack of enough semi-transparent layers (combination of PNGs with alpha channels coupled with DIVs with various opacity CSS settings), IE fails to render the top-most layers. This doesn't happen after 20-30 layers. This happens after 5-7 layers. At first we thought our code was faulty, until we realized that scrolling down such a page with multiple layers will cause text that was previously "invisible" to suddenly be rendered in its specified color... as we kept scrolling, the text would then disappear again. You get the idea.
Obviously, this all works flawlessly in Safari, Chrome, Opera. For IE, we get to re-architect all sorts of work-arounds --a house built on sand.
Er... I'm pretty sure that MS said they would support the video tag back when IE9 was announced. A few months back, they said which format it would support (H.264), although just a week or two ago MS said they would also support WebM if the codec was installed.
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
The whole browser is hardware accelerated by the new Direct2D and Directwrite API's. It's just that the biggest noticeable advantage is the speedup of the canvas element which is used to manipulate a lot of graphics. Firefox nightly alphas had it working before the first IE9 preview was released and it will be in FF 4.0. Firefox devs are also working on OpenGL acceleration for other platforms but that's much further away.
It's fast but can it render the page correctly? It doesn't much matter how fast it is if it doesn't do it right. IE8 is still a big turd - have they actually fixed IE9 or is it all smoke and mirrors by posting speed results? The last results I saw proved that they could pass the tests they wanted to pass but that they failed horribly at real world results. I guess if it's good enough for the education system then it's good enough for web browsers eh?
At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
I tried these canvas-based apps on Windows 7 in various browsers.
The ones I tried work in Firefox 3.6.6, Opera 10.60, and Chrome 5.0.375.99.
On Firefox 3.6.6, they're all horrifically slow.
Opera 10.60 worked a little better than Firefox did, but not by much.
Chrome 5.0.375.99 worked about the same as Opera 10.60 did.
Note: My nVidia drivers are from back in November last year, due to a bug in newer nVidia drivers with the game Shattered Horizons. Not sure if that would affect rendering speeds or not.
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
Maybe you could take your non-IE9 browser to the demo pages linked from the article you'll be able to see if they're doing something standard or something non-standard.
Here's a link:
http://ie.microsoft.com/testdrive/Graphics/DeepZoom/Default.html
Rather than telling you what will happen if you go to that page in, say, Safari, I'll let you go ahead and experience it for yourself. Just think of the thrill you'll get when finding that you're totally right that MS just can't do anything to spec, or maybe you'll be thrilled to find that, OMG!!!!, they're adhering to the draft standards as they exist today.
Which do you think it is? The anticipation almost makes you want to pee, doesn't it?
(Next time spend ten seconds to find out before you shoot your mouth off and demonstrate the accuracy of the old saw: "Better to remain silent and be thought a fool, than to open your mouth and remove all doubt.")
Side note:
I installed the IE9 Preview just to see what they would run like in there... they run quite fast.
Then again, MS provided demos aren't exactly the best way to test this.
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
Microsoft finally caved and built the canvas tag! ActiveX: Bonk with radioactive danger signs. Silverlight: Bonk. SVG? Meh, retained mode scenes with tags all over again. Souped up VML. I'm going to give that a Bonk too (even though it was hardware accelerated).
But canvas, now that's a pixel buffer: simple and beautiful! Now we are *talking*. DING DING DING!
Microsoft's building in canvas is a huge concession that they are losing mindshare to HTML5. And what they're doing is half right by building theirs faster and all micro-optimized and kernel-hooked as they love to do.
But this won't save them, they won't recapture the mojo. Well... that is, not until they backport these new HTML5 features to XP. Here's my take: adding features to an IE that is locked to Windows 7 does not make consumers want to buy Windows 7. Not when it is far simpler for the consumer to install a competing browser that runs on XP (and earlier.) I will go as far as to say that adding canvas to Windows 7's IE is really just advertising new features in the competition's browsers.
I love this canvas tag move by Microsoft, and its far overdue! But they're not back in the game until they stop all this nonsense and backport IE9 to XP (and, heck, Win2K while you're at it!) If your retort is "oh it costs too much to support, oh the API's have changed, oh you should upgrade your 9 year old turd of an OS!". C'mon. Cost? API's? We're talking about moneybags Microsoft here! They can do whatever they want; I have no pity for them when or if they fail due to another botched marketing plan and neither should you. And I will not upgrade my XP/Server 2003 until the reboots get faster on Windows 7. It takes my friend 5 minutes on cherry hardware to get a usable desktop after reboot, and his harddrive is always doing something in the background when nothing is going on! On my XP, the harddrive is quiet unless I am doing something with it, the CPU is idle unless I do something.
Upon further reflection over canvas ... Here's a thought Microsoft, maybe I can meet you half way. How's about backporting canvas to IE7/8 but with no hardware acceleration? This way you can sell the merits of a Windows 7+IE9 upgrade. See, I can be reasonable. :)
Yeah, it could pass every test suite on the planet, but that doesn't mean they can't *add* their own little bit of kit to "extend" it in an incompatible or even *patented* way
You mean, like every other browser out there does? Have you seen how many "-webkit-*" CSS properties are there?
That's actually not the case in IE 9: for security reasons (well, OK, a bunch of reasons, but reading between the lines, security's the big one), arbitrary codecs aren't supported within the browser. It'll ship only with H.264 support, and they've announced that WebM will be supported as an add-on, but that's it at the moment.
I don't really blame them. It sounds like sandboxing DirectShow codecs might not be as easy as it could be, and IE cops enough security flack as it is (mostly deserved, of course).
GDI was designed to work with any sort of plotting device, such as printers. The shortcomings of GDI were the reason that the HAL's for windows display devices were designed, the first of which was WinG, and while later incarnations of GDI gave greater performance and some hardware acceleration support, there are now many hardware features that simply cannot be incorporated into GDI.
Things like texture mapping, gradients, alpha blending, etc.. are just not efficient with GDI, and supporting them would only be for a single kind of plotting device (video cards) so it just doesnt make sense to roll those things up into GDI when there are HAL's specifically tailored for those purposes.
"His name was James Damore."
Where have you been? The video tag debate is over seems flash won.