On Saturday, April 9, 2011 1:53:36 AM UTC+9:30, Dianne Hackborn wrote: > > On Fri, Apr 8, 2011 at 1:16 AM, Numeron <numeron...@gmail.com> wrote: > >> I wouldnt have thought it would work like a busy method if its adding >> itself to something like an event queue or whatever, but I'll take your word >> on it. >> > > Well it is going to continually execute messages, even if it isn't needed. > That is, if it takes you 10ms to draw a frame and the frame rate is 60Hz > (20ms between frames), you should be using 50% of the CPU. But with your > code you will consume all of the rest of the CPU dispatching these messages > for no reason. > > >> Having said that Im pretty sure that your suggestion to invalidate() at >> the end of onDraw() would turn out to be busy too. >> > > Drawing is throttled to the frame rate. > > -- > Dianne Hackborn > Android framework engineer > hac...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > >
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en