canvas-clearRect-size (v20)

Revision 20 of this benchmark created on


Description

clear rect on full canvas vs partial canvas

Preparation HTML

<script>
  var c = document.createElement('canvas');
  c.width = c.height = 450;
document.body.appendChild( c );
  var ctx = c.getContext('2d');
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
clearRect full
ctx.clearRect(0, 100, 450, 200);
ready
clearRect partial
ctx.clearRect(0, 0, 450, 450);
ready
  var c = document.createElement('canvas');
  c.width = c.height = 450;
document.body.appendChild( c );
  var ctx = c.getContext('2d');
ready

Revisions

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