Re: correct and incorrect uses of canvas

On Thu, 2011-07-14 at 13:40 -0700, Jonas Sicking wrote:
> We can and should improve the
> SVG DOM to attract more people, but I suspect there will always be a
> group of people that choose to use canvas anyway due to better
> performance or other reasons.

Do you have examples of people choosing <canvas> over SVG for perf
reasons? Are the perf reasons data-based or merely assumed? Are the perf
reasons the kind of quality of implementation issues that can be
considered to be transient and addressed over the next couple of years?

In theory, SVG should be able to outperform <canvas> for painting,
because the browser engine gets to control how often to repaint, what
parts to repaint and can avoid intermediate bitmaps when the path
stroking and filling can be performed nearer hardware and there are
guaranteed not to be readbacks because the browser knows there aren't
filters in use.

So in theory, if SVG has performance issues, they should be attributable
to the DOM. If a sub-DOM is used for accessibility in the <canvas> case,
then the <canvas> case has a DOM, too.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Friday, 15 July 2011 15:11:56 UTC