title: Android drawing - Background caching
body: <p>Quick question - I'm having control that's extending LinearLayout and I'm overriding it's onPaint method like this</p>
  
  <pre>
  @Override
  protected void onDraw(Canvas canvas) {
  
      super.dispatchDraw(canvas);
  
      _background.draw(canvas);
      _object1.draw(canvas);
      _object2.draw(canvas);
      _object3.draw(canvas);
  
      // etc...
  
  }
  </pre>
  
  <p>Every 40ms I invoke postInvalidate() in background and onPaint gets called on UI thread. The problem is _background.draw is taking over 80% of my drawing time.</p>
  
  <p>So - is it possible to somehow cache background and not redraw it every time?</p>