drawImage whole pixels test2 (v30)

Revision 30 of this benchmark created on


Preparation HTML

<canvas id="screen"></canvas>
<script>
  var ctx = document.getElementById("screen").getContext("2d");
  var image = document.createElement("img");
  image.src = "http://icons.iconarchive.com/icons/ph03nyx/super-mario/48/Retro-Mushroom-1UP-2-icon.png";
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
whole pixel
ctx.save();
ctx.scale(1,1);
ctx.translate(1,1);
ctx.drawImage(image, 0, 0);
ctx.restore();
ready
sub pixel
ctx.save();
ctx.scale(1,1);
ctx.translate(0.0,0.0);
ctx.drawImage(image, 1, 1);
ctx.restore();
ready

Revisions

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