I looked at qindle a little this evening. It's a little hacky. Just a suggestion or two:
Qt/Embedded is well designed... if you need to support a new device, don't hack up the Qt library code. Make your own plugin. I made a class derived from QLinuxFbScreen, so I only had to overload the functions that actually changed (not much). I also made plugins in the same way for the keyboard and mouse, and didn't resort to hacking up the "usb" keyboard device. (Do all the keys work in qindle? It doesn't look like they handle them all. Well, maybe you have to re-translate in the app... which would be ugly as hell)
That said, considering the way they're updating the display, they must not have the inverted palette problem I do. I have to use a flag 'fx_invert' to tell the driver my framebuffer data is inverted.
Because I'm using 'fx_invert', I can't use 'fx_partial', which doesn't do the refresh stage.
Someday I'll get around to fixing my palette, and then I could provide a means of skipping the refresh stage for faster updates.
It looks like they just update whatever region is passed in to setDirty(). On Sudoku, this was almost the whole screen, every time. (Okay, partially the app's fault... but that's probably very common)
I added code that keeps track of the last framebuffer contents, and searches for the bounding rectangle of the actual changes... and I only send that rectangle to the e-ink framebuffer driver for update. It's much, much faster. I also pass the update data in a structure to the driver using ioctl(). (Not a text buffer using sprintf)... but there's probably virtually no performance difference there.
I tried a Qt terminal emulator program before I added the framebuffer tracking code, and it updated the whole screen so often it was totally unusable. I should go back and try it now.
Okular is supposed to use Poppler for PDF... I don't see any of the massive dependencies that Poppler has in the sample. So, they must not actually have PDF support. ????
I'm not surprised... the dependency list for Poppler is monstrous...
|