Hi Philippe, I would expect the current bitmap loading and conversion code to be slow, but there are definitely improvements that could be made.
I recently changed the pnm_load function to call the video driver's 'pixel' function to store each pixel rather that quickly loading them into the bitmap itself. This change was for compatibility with drivers that don't use the standard bitmap structure, such as the X11 driver. Clearly in embedded systems it would be beneficial to have the original fast version of pnm_load available as a compile-time option. The delay when changing video modes is due to performing color conversion on the bitmap. PicoGUI bitmaps are always stored in a device- and mode-dependant format, so bitmaps will always be slower than vector graphics when changing modes. However, the functions that do this conversion are currently written for simplicity and small code size, since most platforms won't need them. Like with pnm_load, we could add a compile-time option to use faster bitmap conversion functions. Of course, a set of bitmaps already in the display's native format would definitely speed this process. PicoGUI already has an architecture for supporting multiple file formats- we would just need to create a file format to store a bitmap in one or more device dependant formats, and write a loader to pick the correct format and load it. Quoting Philippe Ney <[EMAIL PROTECTED]>: > Hi Micah, > > Using a bitmap and a vectoriel keyboard, I note the following > * bitmap keyboard take 4 x more time to load > * switching from 1bpp to 2bpp (and vice versa) takes also 4 x more time > with bitmap keyboard > > This seems to be due to the conversion of the internal bitmap format > stocking. > The full kbd is made from 6 bitmaps of 240*80 pixels (normal, shift, > caps lock, num, ctrl, symbols) coded in pbm format. > Then this behaviour is maybe normal...? > Christian note that most of time is spent in the pnm_load function. > Did you think there is a way to speed this? > Maybe using precompiled bitmap in native format for each supported video > depth of the server? > > TIA, > -philippe > > ps. this behaviour is visible on the VZ platform. The same certainly not > occure on a pc > > _______________________________________________ > Pgui-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/pgui-devel > -- Only you can prevent creeping featurism! _______________________________________________ Pgui-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/pgui-devel
