IE9 beta's HTML5 support isn't there yet: 3 big canvas gotchas
dt.deviantart.com
dt.deviantart.com
It seems to come down to the limitations of Direct2D, which doesn't seem to support any other compositing operations except source-over, a.k.a. "normal alpha blending". This is fairly surprising when taking into account that Direct2D is a very new graphics API (it shipped in Windows 7)...
I think the root cause is that Microsoft's graphics APIs have long evolved in a different direction compared to everyone else. Make no mistake, Microsoft is a very important force in graphics because they control Direct3D, and that has placed them at the vanguard of high-performance accelerated 3D graphics.
Direct2D seems to mostly take design influence from Direct3D. One of its explicit goals is to provide 2D utility graphics for Direct3D games -- stuff like HUD displays for games. The traditional "Porter-Duff" compositing operators (i.e. the blending modes missing from Direct2D) are not very useful in this environment, so instead Direct2D concentrates on "game-like" stuff like high-level geometry objects.
In contrast, the other major browsers use graphics APIs that fundamentally derive from the Adobe school of print-oriented graphics, where an image is built from low-level immediate mode operators. Think PostScript and PDF.
The original Canvas JavaScript implementation shipped in Mac OS X 10.4 to support Dashboard widgets. Canvas was just a paper-thin wrapper over Apple's Quartz API, which in turn was essentially a royalty-free implementation of the PDF graphics model (before Quartz, Apple/NeXT were licensing Display PostScript from Adobe).
I think Mozilla's Canvas implementation uses Cairo, which is an open-source library heavily modelled after PDF and Quartz. Chrome uses their home-grown Skia, which is also very similar.
Poor Microsoft. If they had taken the opportunity in 2004, they could have easily dictated a simple web graphics standard that would have played to the strengths of the accelerated graphics API that they control. But instead they were busy building giant fortresses of proprietary APIs like the dead-end Windows Presentation Foundation, and now they're having trouble implementing something as superficially simple as Canvas.
But with that said, it is built on Direct3D, which can do this type of compositing, at the very least with shaders. I'm sure they could add that support into D2D, or IE can go directly to D3D to do it.
I'm kind of surprised IE didn't just use D3D for most of canvas anyways (and D2D for some things like text rendering).
Porter and Duff can be forgiven because the "real world" didn't exist when they designed this model in the early '80s. At the time, a frame buffer add-on to a computer could cost as much as a car...!
When designing a modern graphics API, I think it would be more useful to look at the operations that people are actually familiar with, e.g. Photoshop blending modes, and design the interface to match those expectations.
http://ie.microsoft.com/testdrive/info/downloads/Default.htm...
I wonder if he has the same issues with the latest platform preview (which came out nearly two months ago).
Now, all this fairness aside, I'm extremely curious why MS isn't adopting the rapid release cycles that the Chrome team have used. As a (potential) consumer of the Internet Explorer line of products, I feel like I'm left out in the cold when I see that the last release was sometime last September. In the meantime, Chrome has added a major enhancement to their JavaScript engine, WebGL support, and more. More importantly, they've added this stuff incrementally so I, the (current) user of Chrome don't have to wait for months for the next major release.
Or perhaps more to the point, I'm curious why the IE9 marketing team don't see the promotional advantages of rapid releases as compared to the old major release model. As the Chrome team have said...market features, not releases.
Please call me out if my naïveté is showing, but couldn't MS fragment IE into consumer and enterprise versions? Surely something must be done to appeal to non-enterprise users to halt the increasingly rapid deterioration of IE market share.
To expound on this idea a bit...imagine IE adopts the multiple channel approach like Chrome has. They could have the four typical channels (canary, dev, beta, stable) and add another one called "enterprise" or something like that. The first four would receive silent automatic updates while the "enterprise" channel would only be updated when the administrative user requests to do so. Furthermore, they could perhaps choose exactly which release they want. So theoretically, they could upgrade or downgrade the browser without being subjected to automatic updates.
Just an idea, I know. It's probably much harder to implement in reality, but something must be done, and this sort of setup would probably be a one-up on Chrome (something I think they desperately need at the moment).
There's rumors that the RC is coming on the 28th. And RTW is probably a few months after that. Not Google like speed, which is ridiculously impressive, but a beta and 7 tech previews in this time isn't bad.
Chrome went from a state of non-existing to very popular in the same time. Microsoft's web browser development speed is abysmal for such a powerful and large software company. They either don't care, or they want it to be slow and have poor performance. I can think of no other reason for such slow development of their web browser, especially in an era where everyone knows how important the web is.
But I do agree that it's too slow. They really do need a Chrome like schedule.
And I think it's also important to note that I'm not talking about speed of feature releases. I'm talking about speed of general releases. New Chrome features often go from conception to stable release in 2-3 months because of the development structure in which they are released. I wouldn't at all be surprised if the IE team have worked out these canvas issues already, but they just haven't released it (which is why I mentioned that the last beta release was in September).
Business as usual.
The only thing that changed is the nature of the needed workarounds (fix broken canvas instead of fix missing canvas), so that IE9 just brings more frustrating work to the table. One more special case to handle.
In the application I'm maintaining, we have CSS and JS to make the thing work in real browsers and then one file for each version of IE to handle their specific bugs.
As it's looking now, IE9 won't improve on the situation, but just require two more files (CSS, JS) to fix the new, IE9 specific issues, thereby increasing the development time of any new feature because one more special case must be handled.
Why can't Microsoft just get their act together. This is so dammed frustrating
Try your browser: https://developer.mozilla.org/en/Canvas_tutorial/Compositing WebKit still doesn't have all the -in or -atop working, despite bug reports going back very nearly a year now: https://bugs.webkit.org/show_bug.cgi?id=34027
http://test.w3.org/html/tests/reporting/report.htm
According to this no browser is currently following 100% the canvas spec.
No browser is remotely that compliant. Microsoft already idiotically used that suite to declare themselves king of canvas
http://www.pcworld.com/businesscenter/article/209787/no_html...
These tests are more involved. Last I checked, no browser gets much more than 80% (though I don't have or want Windows so I can't personally check IE9)
I feel like this has been, and is, said about a lot of things that Microsoft should be kicking ass on. Why is Microsoft either unwilling or unable to lead the charge on these kinds of things? Can they say that it's not in their best marketing interest to have a crappy, slowly developed product?