[Summary]
A gtk/gdk program invoking standard gdk drawing functions on DirectFB
runs slower than the same one runs on X.
[Detail]
The following code is from a simple gdk program named "example.c"
-------------------------------
#include <gtk/gtk.h>
...
void draw_segments()
{
...
gc = gdk_gc_new(drawarea->window);
gdk_gc_set_rgb_fg_color (gc, &color);
gdk_draw_segments(drawarea->window, gc, lines, 10 );
...
}
...
int
main (int argc, char *argv[])
{
...
button_draw = gtk_button_new_with_label("draw");
gtk_container_add (GTK_CONTAINER (vbox_main), button_draw);
g_signal_connect( G_OBJECT(button_draw), "clicked",
G_CALLBACK(draw_segments), NULL);
...
}
-------------------------------
I compiled example.c with gtk+-directfb-2.0.9 linked dynamically, and
separately compiled it with gtk+-2.2.0 linked dynamically. But when I
perform these two binary objective program, I found when I press the
button "draw", the displaying rate is very different between these
two. Program with gtk+-directfb-2.0.9 is much slower than that with
gtk+-2.2.0. I was confused by this.
I wonder what the problem is. I had thought gdk-directfb would perform
much faster than gdk-x11. But the result that I found is against my
expectation. Could you please help me to explain this? Or is thers
someting wrong with my code "example.c"?
Here is my frame buffer device's information.
-----------------------------------------------
[EMAIL PROTECTED] /]# fbset -i
mode "640x480-60"
# D: 25.176 MHz, H: 31.469 kHz, V: 59.942 Hz
geometry 640 480 640 26208 8
timings 39721 40 24 32 11 96 2
accel true
rgba 8/0,8/0,8/0,0/0
endmode
Frame buffer device information:
Name : MATROX
Address : 0xd8000000
Size : 16773120
Type : PACKED PIXELS
Visual : PSEUDOCOLOR
XPanStep : 8
YPanStep : 1
YWrapStep : 0
LineLength : 640
MMIO Address: 0xda000000
MMIO Size : 16384
Accelerator : Matrox G400
-----------------------------------------
And DirectFB starting information below.
-----------------------------------------
(*) parsing config file '/etc/directfbrc'.
---------------------- DirectFB v0.9.20 ---------------------
(c) 2000-2002 convergence integrated media GmbH
(c) 2002-2003 convergence GmbH
-----------------------------------------------------------
(*) Single Application Core. (with MMX support) (2004-11-09 09:48)
(*) DirectFB/misc/memcpy: using MMXEXT optimized memcpy()
(*) DirectFB/InputDevice: IMPS/2 Mouse (1) 0.9 (convergence integrated
media GmbH)
(*) DirectFB/InputDevice: IMPS/2 Mouse (2) 0.9 (convergence integrated
media GmbH)
(*) DirectFB/InputDevice: Keyboard 0.9 (convergence integrated media GmbH)
(*) MMX detected and enabled
(*) DirectFB/GraphicsDevice: Matrox G400/G450/G550 0.6 (convergence
integrated media GmbH)
(*) DirectFB/Layer: Enabled 'FBDev Primary Layer'.
--------------------------------------------------------------------