draw canvas whole vs section

Benchmark created by Michael Deal on


Preparation HTML

<canvas id="source" width="600" height="480"></canvas>
<canvas id="c2048" width="1024" height="1024"></canvas>

Setup

var canvas = document.getElementById("source")
  var context = canvas.getContext("2d")
  var c2048 = document.getElementById("c2048")

Test runner

Ready to run.

Testing in
TestOps/sec
drawImage
context.drawImage(c2048, 0, 0);
ready
drawImage Section
context.drawImage(c2048, 0, 0, 1024, 1024, 0, 0, 1024, 1024);
ready
drawImage Whole
context.drawImage(c2048, 0, 0, 1024, 1024);
ready

Revisions

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

  • Revision 1: published by Michael Deal on