Hi,

the following fragment of code, show very different performance (and 
responsivity) between 1.1.7 and 1.1.8rc3 (and also a lot of recent 1.1.x 
releases).


-------------------------------------------

#include <FL/Fl.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Dial.H>
#include <FL/Fl_Button.H>
#include <stdio.h>
#include <unistd.h>

Fl_Dial *dial = 0;
Fl_Button *but = 0;

static void cb_but(Fl_Widget* in, void* p)
{
        but->deactivate();

        // start value of "i" was really more small, 
        // but it's to show the problem

        for (int i = 99999; i >= 0; i--)
        {
                dial->value(i/100000.0);
                Fl::check();
        }
        but->label("Restart");
        but->activate();
}

int main(int ac, char **av)
{
        Fl_Double_Window* o = new Fl_Double_Window(0, 0, 640, 480, 0);
        o->size_range(640, 480, 0, 0, 0, 0, 1);
        Fl_Group::current()->resizable(o);

        { Fl_Dial* o = dial = new Fl_Dial(10, 60, 200, 200);
                o->box(FL_EMBOSSED_FRAME);
                o->type(FL_FILL_DIAL);
                o->color(FL_BLUE);
                o->selection_color(FL_YELLOW);
                o->angle1(180);
                o->angle2(-180);
        }
        { Fl_Button* o = but = new Fl_Button(10, 300, 60, 60);
                o->label("Start");
                o->callback(cb_but);
        }

        o->end();
        o->show(ac, av);

        return Fl::run();
}

-------------------------------------------

I' don't see evidence of difference using single buffered Window,
but performance using Fl_Double_Window is severely worst using 1.1.x/1.1.8.

I have tested this on linux (openSuse10.2, Xorg 7.2.0rc2),

this was my config command line:
./configure   --disable-largefile --enable-shared --enable-xdbe --enable-xft 
--enable-threads --enable-localjpeg --enable-localpng --enable-localzlib


The difference is visible, once pressed button "start" and then maximizing the 
window.

or may be I'm doing something in the wrong way ?

Thanks

Andrea

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to