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.'"
will ie9 support that?
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.
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
And this time they would do it not by breaking standards, but by implementing them really well.
Those devious bastards, how dare they!
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
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
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. Look at what they did with kerberos, or like, *any other standard* they've dealt with. To Microsoft, "standards are for chumps."
Saying "Microsoft is standards compliant THIS time" is just too much to swallow.
Go ahead, softies, mod this one down too. I have more karma than you.
--
BMO
Direct2D? DirectWrite? 15 years ago, we were calling that DirectDraw, and accelerated rasterisation was the hottest thing since sliced time. I guess what goes around comes around, and these kids today will be laughing at the new kids in another 15 years when they discover the wonders of DirectFlatOGram. Also, their Goddamn DirectNoise is too loud on my DirectLawn.
If you were blocking sigs, you wouldn't have to read this.
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. :)
The provided demos really specifically test how fast the browser can draw N images (or whatever), with variations (alpha channel, scaling etc). I don't see what's wrong with such a test if you want to specifically test 2D rendering performance.
Eh? What rock have you been sitting under?
CANVAS is a standard HTML5 element.
Hardware acceleration is coming to, or already is in some browsers.
Why would you NOT want this? Microsoft are actually competing for crying out loud, that is like a miracle if i ever saw one.
The only stupid part about all of this is MS don't seem to be backporting IE9 to XP because "Direct2D" is apparently only possible because the pure AWE of Windows 7...
At least, this was the last time i heard about it, they could well be doing it now since they want as many people away from IE6, which is plain not going to happen since they seem incapable of understanding exactly WHY people still use IE6!
The only people who still have to suffer IE6 is businesses who Microsoft got stuck in the ActiveX trap, which they then killed...
I love that they are adding HWA to it, especially considering how i will be building something around CANVAS pretty soon. IE9 isn't all that bad actually. I wouldn't even mind if they were using that browser anymore as it passes a fair amount of standards to the point where worrying over layout is a very small issue now.
I still personally hate it, the UI is awful.
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?
Every time I hear "hardware accelerated" associated with the browser, I feel as though they have essentially given up trying to unbloat their browser and operating system so they are trying to make up for it by pushing off such tasks to the hardware. ... Other browsers get by just fine without hardware acceleration.
So fine, indeed, that Safari has already added it, and Firefox, Chrome and Opera are all scrambling to implement it.
Seriously, have you even seen the demos? It's not about "needs acceleration to be as fast as other browsers" at all. It's about "5-10x faster than browsers without acceleration".
ActiveX is a plugin API, the other guys all had one (netscape had NPAPI). What people blame microsoft for is ActiveX actually being successful, not the concept of browser plugins. ActiveX was used in apps to do stuff you couldn't do in HTML (and still can't do). Why not hold microsoft accountable for the stuff they did that was actually out of the ordinary? The main thing microsoft did wrong was not the development of proprietary features, but rather the complete lack of development between 2001 and 2006.
DirectDraw was just basic graphics acceleration. Mostly what DD offered was the ability to write things quickly to video memory, as one could do in DOS. It had support for blitting, calling page flips, and so on. More or less the kind of stuff you could do when you had low level access to everything in the system, but which you couldn't really do with a GUI in the way directly.
This all got deprecated by default with the advances in Direct3D and so on. You could just use a texture quad to do all that to the extent it was still needed. Most programs these days aren't concerned with quickly pushing a bunch of raw pixels to the screen.
Ok well Direct2D is a vector graphics API. It is to allow you to design 2D scenes that scale well to any size, and then its partner DirectWrite handles all the nice n' flashy font stuff. Part of the idea is to be able to easily do resolution independent user interfaces and such. DirectDraw wasn't for that at all, and the GDI isn't all that well suited for it. Direct2D is easy interfaces to allow you to draw custom, scalable, content. Could all be done with D3D probably, and you need a card with some 3D features backing it up to use, but that would be rather complex.
The basic hardware accelerated rasterization is something that has just been assumed for years which is why you don't hear about it. The GDI would make use of graphics cards to accelerate basic drawing. However the new features are all about doing more than just speeding up putting pixels on the screen. Rather you have the graphics card actually do some heavy lifting and composite the image together. THAT allows for cool new 2D features, like truly resolution independent stuff. You tell the GPU "I want a line from here to here," it takes care of all the details.
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."
Nobody has ANY problems if ms enhances css with ie- settings. really. they are welcome!
It's more or like, what you can do with those webkit- and moz- settings. like using css3 features already now. and so on. You can enhance specific browsers without breaking standards.
But MS does not enhance it with obviously local flavour, like naming their own finetuning tags "ms-" or "ie9-" or sth. They do crazy stupid exceptional stuff, that does not reveal itself and reinterprete standard tags breaking compatibility.
And that was horrible and we hope all, they never repeat it.
Don't let your panic run away with you. Yes ... HTML5 will offer a lot crazy crap that doesn't rely on a plugin to make it work. That doesn't you won't be able to prevent such things from rendering and using your system resources. Just as people made a plugin to strip flash from the dom, people can easily make another plugin to strip the canvas tag from the dom.
No, I mean stuff like this which people use today already to make iPhone/iPad-specific websites that break everywhere else.
It's funny how history repeats... MS has considered "-webkit-text-size-adjust" so popular that IE in Windows Phone 7 will support it, despite it not being any kind of standard. Can you say "document.all" and "innerHTML"?
The fact that all the HTML 5 stuff that I have tried that were not provided by MS makes me wonder if these are legit.
That said, the asteroids one they linked to ran as fast as a native app in my chrome nightly build (I use the nightly build because they come in a self contained zip file which allows me to get around the no-install restrictions from my work which still uses ie6)
http://www.kevs3d.co.uk/dev/asteroids/