canvas global composite operations

JavaScript performance comparison

Revision 4 of this test case created

Preparation code

<canvas width="640" height="640" id="testCanvas">
</canvas>
<script>
Benchmark.prototype.setup = function() {
    var ctx = document.getElementById("testCanvas").getContext('2d');
    var image = new Image();
    image.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAABhklEQVRIS8WXjVHDMAyF5QmACYAJYAMYgU5AOgEwQdwJCBMQJoBuUDZoJ4AR0gnCe05MWpP0XOLYvnNzl0r6/PNiyUp8m5Y7mN6gX6Oftk96r9Er81SyklyWPiHVQSMNgJIHqeWxhfnErOBTwOdFtBlQbxsGa8ng8XwE0AUQOgf8o4/cD84xYs40TCsAf3JD/QVrKWF0H4b5G6UEfL4bcx8cdqb7Y+eeL4xWTOvAzZ6+Bp6pG25m97wBU70iXyOE5DteCu6SardgjRe5r/dIuwXA2oI5kpORAX3dK4DPFH54Ir37egWymykscMhv1m9cUDhnvII1z+CY7ZPgbxDPY1LBWhNcR4YaXFJwiqXeJBRXws8p0QHSJImYR+aWSSl5kmBapLqnThRbMC66tNgsd4y9dgoBe3RNqfDB0sfCpyn23rCi2e7RHKO8NRWHmw8OFfTc83KE4Cik7LiCvlt2qp0lKbuv4gksTP/XFcZdG6q+llvkM3tpu2pNNnhW+K+5tA1cWdxwP3NnZfo/FCZKAAAAAElFTkSuQmCC'
};
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
image
ctx.drawImage(image, 0, 0);
pending…
path
ctx.save();
ctx.beginPath();
ctx.arc(15, 15, 15, 0, 2 * Math.PI, false);
ctx.fillStyle = 'green';
ctx.fill();
ctx.restore();
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment