title: Canvas opaque - change default background color
body: <p>I'm using <code>canvas.getContext('2d', {alpha: false});</code> (<a href="https://wiki.whatwg.org/wiki/CanvasOpaque" rel="nofollow">wiki info</a>) to remove canvas opacity and improve performance of animation. Unfortunately after that, canvas element gain white background. Is there an option to change the default color of canvas background/color? </p>
  
  <p>I tried <code>drawImage()</code> to fill whole area, but (because of animation) I think it is not the best solution:</p>
  
  <pre><code>var canvas = document.querySelector('#mycanvas'),
      ctx = canvas.getContext('2d', {alpha: false});
  
  function run() {
      ctx.clearRect(0, 0, size.width, size.height);
  
      ctx.drawImage(bg, 0, 0, size.width, size.height);
  
      draw();
      update();
  
      requestAnimationFrame(run);
  }
  </code></pre>
  
  <p>I really care about performance, so it would be useful to change the color only once.</p>
  
  <p>Any ideas?</p>