[whatwg] Adding SVG Filter-like functionality to Canvas 2D Context

Ian Hickson ian at hixie.ch
Mon Jul 6 16:24:26 PDT 2009


On Tue, 7 Jul 2009, Hans Schmucker wrote:
> >
> > Doing filters in <canvas> is an interesting idea, but I think that it 
> > is probably too early to add it. We have dozens of feature requests 
> > for the next version of <canvas> already.
> >
> > For what it's worth, you can do filters manually using getImageData() 
> > and putImageData().
> 
> But if we begin with a more declarative approach now, we can actually 
> encourage browser vendors to include the functionality if they want 
> greater speed. Fallbacks to putImageData would provide basic 
> functionality anywhere, but if a vendor wants to access greater speed 
> for say, photo editing or games, he can chose to add filter support and 
> see an immediate speed increase.
> 
> Basically, filters for Canvas would provide new functionality through 
> speed. Responsiveness would increase dramatically for certain kinds of 
> applications.

I think in practice if people have declarative filter needs, they'll just 
use SVG. But that said, filters are indeed something we should look at in 
a future version. Right now, though, I'd rather we let the browser vendors 
get interoperable on what exists already in the spec.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list