Well... I will try to explain me clearly... If it isn't clear please notify me... The main trouble comes from the fact that we can't know if an image is displayed or not. So actually, at each frame, we notify Tk that the image has changed and Tk will propagate the information to all widgets linked to the image. Then, each widget will check if the image is displayed or not and if it is displayed it will ask us to redraw it. And just before we redraw it, we copy our internal buffer to the image and we ask to Tk to draw it (don't forget we act as a hook). Now, I just think about that, but not sure it will be good since it can raise inconsistencies, in place of change the image just before we warn Tk we changed it, we can increment when we draw itso that when the image is hidden it stops and resumes only when we redisplay it. Now the inconsistency, imagine the same image is displayed at two places in same time, one is showed and one is hidden, if we display the hidden one, it will show us a frame. We rehide it wait a little and show it again, we won't have the animation where we leave it ! So I prefer it does the same thing everywhere and everytime : it continues the animation in the background. Phil
Le Thursday 26 January 2006 23:28, Youness Alaoui a écrit : > anigifs take too much CPU, is it normal ? I though it used less cpu than > when Phil added his fix (but uses less CPU on other machines..) > Also, even if the image is not in screen, it gets udpated.. I think there > is a logic problem in your code, probably a small one, but you might want > to check (I noticed not only because of high CPU if chat window is opened > even if no smileys shown).. I just saw Alvaro's DP (animated gif), I put > the tooltip, I see the beginning of the animation, I remove the mouse (no > tooltip), wait a few secs, then put back the tooltip, the animation is at > the end, while it should have just continued from the last moment I > removed the tooltip (I have no window opened with Alvaro, so there was > nowhere else it could have been showing itself...) ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Amsn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/amsn-devel
