Re: Double buffer widget drawing




> You see, only one X call is used here. It is much faster than current
> algorithm and it is completely flicker free.(err.. perhaps memory
> requirements will change)
> Implementation of this algorithm will require *major* GTK(and GDK) change.
> We can also give user a choice. One theme will draw straight to the
> screen, another to memory.

I do like this idea.

I was thinkign in having something like:

widget_expose (GtkWidget *widget, GdkEventExpose *expose)
{
    GdkDrawable *paint;

    paint = gtk_begin_paint (widget, expose);
    gdk_draw_line (paint, gc, 0, 0, 10, 10);
    gtk_end_paint (widget, expose);
}

gtk_begin_paint would allocate a Pixmap for the expose region, all
draw operations would go there and gtk_end_paint would only Copy the
pixmap to the window.

I talked to Owen about this, and he already had similar plans to this
for 1.4 apparelty:-)

Miguel.



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