ctx-flip-performance3 (v3)

Revision 3 of this benchmark created on


Description

Don't run the test until you see a kitten below (so that we know the image is loaded)

Preparation HTML

<canvas id="canvas1" width="500" height="500"></canvas>
<script>
var can = document.getElementById('canvas1');
var ctx = can.getContext('2d');


var img = new Image();
img.onload = function() {
ctx.drawImage(img, 0, 0);
}
img.src = 'http://placekitten.com/200/200';


</script>

Setup

can.width = can.width;

Test runner

Ready to run.

Testing in
TestOps/sec
flip
ctx.scale(1, 1);
ctx.drawImage(img, 0, 0);
ready
drawing an image
ctx.scale(-1, 1);
ctx.drawImage(img, -200, 0);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.