drawImage whole pixels (v14)

Revision 14 of this benchmark created by ryan jacobson on


Preparation HTML

<canvas id="screen"></canvas>
<script>
  var ctx = document.getElementById("screen").getContext("2d");
  ctx.scale(0.33,0.75);
  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.drawImage(image, (0.5 | 0), (0.5 | 0));
ready
sub pixel
ctx.drawImage(image, 0.5, 0.5);
ready

Revisions

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