Both versions are affected because on_expose function was not changed.
If you check serc/greeter.c::on_expose, you will see that this function
redraws entire screen on each call:

    if( bg_img )
    {
        cairo_matrix_t matrix;
        double x = 0, y = 0, sx, sy;
        cairo_get_matrix(cr, &matrix);
        sx = (double)gdk_screen_width() / (double)gdk_pixbuf_get_width(bg_img);
        sy = (double)gdk_screen_height() / 
(double)gdk_pixbuf_get_height(bg_img);
        cairo_scale(cr, sx, sy);
        gdk_cairo_set_source_pixbuf(cr, bg_img, x, y);
        cairo_paint(cr);
        cairo_set_matrix(cr, &matrix);
    }

Witn src/greeter.c::on_timeout function which changes system time every
second, it leads to full screen redraw every second. In my case it means
to scale 800x800 pixels wallpaper image and put it on 1600x900 pixel
screen. This algorithm just cannot work fast or consume ow CPU.

It need to use information from evt and redraw only affected area. Also,
I think it should cache pre-scaled bitmap.

Sorry, I have no experience in GTK/Cairo programming and cannot provide
a patch right now.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/733912

Title:
  lxdm-greeter-gtk excessive CPU usage

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to