Re: Very slow gdk_draw_pixbuf



Hi, John --

The Linux guy and I investigated this somewhat thoroughly. It doesn't happen on any machine but mine. And if I SSH to another server, it doesn't happen either.
So, there's something peculiar to my machine ... running Win2K, Radeon 
7800, IBM Thinkpad, 1700MHz. And it's even stranger because XClock shows 
completely black on my machine ... the hands should be multicolor.
We don't know what it is, but since it's peculiar to only my machine, the 
team wisdom is to pretend it's not happening at all. We can't hold up 
development of this product to troubleshoot the problem if the problem 
won't be happening elsewhere.
Fortunately, the group has enough experience with GTK and the other 
machines in the project to be able to reasonably make the judgement that 
the problem is confined to my machine.
I'd like to know what it is, but the problem has already set me back too 
far ... so I'm moving on.
Thanks for your help!


At 06:04 AM 9/1/2005, John Cupitt wrote:
Hi Barry,

I think there must be something rather broken with your GTK install. I
changed your example like this:

#ifdef DRAW_PIXBUF
  if (pixbuf == NULL)
    pixbuf = gdk_pixbuf_new_from_file((gchar *) "mapserv.png", NULL);

  if (pixbuf) {
    GTimer *timer;

    timer = g_timer_new();
    gdk_draw_pixbuf(pixmap, NULL, pixbuf, 0, 0, 0, 0, -1, -1,
        GDK_RGB_DITHER_NORMAL, 0, 0);
    printf( "gdk_draw_pixbuf took %gs\n", g_timer_elapsed( timer, NULL ) );
    g_timer_destroy( timer );
  }
  else
    g_print("No pixbuf!\n");
#else

And for a 300x300 pixel PNG I get output like:

gdk_draw_pixbuf took 0.001678s
configure_event
expose_event
gdk_draw_pixbuf took 0.002511s
configure_event
expose_event
gdk_draw_pixbuf took 0.001685s
configure_event
expose_event
gdk_draw_pixbuf took 0.001372s
configure_event
expose_event
gdk_draw_pixbuf took 0.000976s
configure_event

I'm using gtk+-2.8.0, but I had (approximately) the same numbers with
2.6.4. This is on a 1.8GHz laptop with Ubuntu 5.04 and some sort of
radeon mobility.

John
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]