title: Android: When to call invalidate()?
body: <p>I'm using Matrix to rotate a PNG image on the screen. I want to move the rotation operation to a separate thread so the UI thread isn't burdened with it. But this raises some interesting questions.</p>
  
  <p>I expected to need to call invalidate() once the Matrix was applied to the ImageView. However, the rotated image is appearing just fine on the screen - and I never call invalidate(). There are no touch areas, nothing I'm doing would explicitly tell the UI to refresh the screen. What is stimulating the UI thread to update the display? Does the UI thread magically "know" that the display needs to be updated (and therefore an explicit call to invalidate() is not necessary) because IT is the thread touching an object that is part of the display?</p>
  
  <p>When I move the rotation out of the UI thread, I will be manipulating the same ImageView that the UI uses to render the screen. This sounds like a classic thread conflict problem that would require synchronization (because the same object will be accessed by multiple threads). But because of the above behavior, I'm not sure how this is handled. Since the UI thread seems to "magically know" that the screen needs to be updated, do I NEED to synchronize - or does the separate thread just call invalidate() on the View and that will take care of it?</p>
  
  <p>Thanks!</p>