The Following 2 Users Say Thank You to shin For This Useful Post: | ||
![]() |
2010-01-27
, 22:55
|
|
Posts: 3,811 |
Thanked: 1,151 times |
Joined on Oct 2007
@ East Lansing, MI
|
#2
|
The present issue with the SVGClock is that, it makes the device slow, when on the foreground. It consumes CPU cycles while on the foreground, as I am painting all the SVG components mentioned above through the expose event every time seconds hand ticks, called by the self.queue_draw().
I think if we can buffer the clock's stationary background and foreground SVG files and display from the buffer, whenever the clock's Hour/Minute/Seconds hand moves (only dynamic components of the clock), then a good amount of CPU cycles can be reduced. I guess this can be done using pixbuffs/pixmaps.
I would really appreciate if someone could help show some direction on how I can achieve this buffering of the stationary SVG components and paint only the dynamic components when the clock ticks..
Though a bit lengthy I am pasting the code below for easy reference:
Last edited by shin; 2010-02-15 at 14:03.