Re: [android-developers] invalidate() painting method

2012-10-14 Thread Adam Ratana
Hi Romain, If you don't mind, would you please describe how the implicit throttling mechanism works, or, point to any documentation on it? I think I am running into this, when my activities start, and the view is being invalidated often, it is throttled it seems for a little while (5-10

Re: [android-developers] invalidate() painting method

2012-10-14 Thread Romain Guy
The throttling is simply a side effect of v-sync. Every paint request is synced with the display's refresh rate. This means you can only draw every ~16 milliseconds (== 60 fps.) Of course, if your application cannot draw in 16 ms you will be synced every 2 frames and you will fall to 30 fps. On

Re: [android-developers] invalidate() painting method

2012-10-14 Thread Adam Ratana
Thank you for the response! I should also say that this only occurs upon creation of the activities, and not when they resume or at any point thereafter. The only thing in common that the various activities have is that they use canvas drawing calls (and draw text), some are not even timed based

[android-developers] invalidate() painting method

2012-10-11 Thread bob
As you may know, you can create a View subclass and then call invalidate() at the end of the painting method. This produces continuous updating. Is this *really really* bad? It sure is attractive due to its simplicity. However, there is no explicit throttling mechanism, which can be

Re: [android-developers] invalidate() painting method

2012-10-11 Thread Romain Guy
There is an implicit throttling mechanism as of 4.1 but even then it's bad. If you don't need to draw, don't draw. You're going to waste battery. On Thu, Oct 11, 2012 at 2:34 PM, bob b...@coolfone.comze.com wrote: As you may know, you can create a View subclass and then call invalidate() at the