All examples By author By category About

GerHobbelt

HTML5 Canvas path benchmark ('source-over' composition mode)

Canvas Path Benchmark …… ? 8

This example benchmarks the time taken to draw a line consisting of 5000 separate segments into an HTML5 Canvas.

It is derived from this example which performs the same Canvas benchmark but with another (non-default: 'source-over') composition mode, called 'destination-atop', which won't render identically to the SVG benchmark here.

When you want to observe the different canvas composition modes and their effect on timing, check out this benchmark; you will notice that different browsers will render different views as canvas composition mode support is not complete for many of them.

The Canvas results are faster than those measured by the equivalent SVG Path Benchmark, but mind the huge differences between the major browsers: Opera and IE9 have their SVG act together while the others are sluggish.

source: gist.github.com/gists/3331937