More specifically: traditionally all drawing in the emulator is done in software. On all production devices starting with HC it is done in hardware. Further, window compositing (which is the important aspect of window animation performance) is done in hardware on pretty much every production device since the G1. On more modern versions of the platform, this is even often done with hardware overlays (so not even the GPU is used to composite the windows, window animations are basically just twiddling hardware registers to change how the overlays associated with the windows are shown on screen).
On Sun, Jun 24, 2012 at 6:23 AM, Francisco M. Marzoa Alonso < [email protected]> wrote: > Hi, > > Emulator is really slooooooooooooooooooooooooow, you should not measure > your app performance based on emulator results. > > The speed of an animation depends on the speed of the device: the faster > the device, the faster the animation. > > You must use some kind of method to sync your animation framing so it > runs at same speed on all devices. For example, if you plan to show 25 > frames per second, i.e. one frame every 40 milliseconds, you may > calculate the time for next frame based on System.currentTimeMillis() + 40. > > It should be something like: > > > // Init this value on the constructor, for example > nextFrameTiming = 0; > > ... > > // This could be wherever the image its drawn or prepared to be drawn, > depending on how your code works > if ( System.currenTimeMillis >= nextFrameTimming ) { > nextFrameTiming = System.currentTimeMillis() + 40; > changeFrame(); > } > > So you only change to a new frame as fast as once each 40 milliseconds. > Note that this will be useful to make the animation slower in devices > where it runs too fast, but obviously it will not made it to run faster > in devices where it runs too slow due hardware limitations. > > > On 24/06/12 14:00, ala hammad wrote: > > Hello all , > > i want to ask why when animate activity show slow in emulater but in > device > > show very fast .. > > how to make it slowly to show it to user ??? > > > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

