Quote:
Originally Posted by Mackx
I tried three methods:
1) Direct use of FBIO_DELTA_UPDATE_DISPLAY;
2) Use of erscribble (which uses FBIO_DELTA_UPDATE_DISPLAY) and;
3) Use of a label to force update
|
Actually, erscribble uses FBIO_DELTA_DRAWMODE_PIXELS, which is vastly quicker because it only updates a single point on the screen. Method 3 is actually a special case of method 1, because you can choose the waveform to use (you used the full refresh waveform in your code, but you don't have to), so I won't comment on this.
Unfortunately, method 1 is just too slow to keep up, which makes sense because its actually updating the entire screen. Using special fast update waveforms, I was able to get the delay down to 0.5 seconds, which is still actually significant.
Here is how I have things now:
1. erscribble draws on the screen as you write, and the update is near instantaneous (same as UDS). You will need to adjust for the screen coordinates, which is easily done.
2. You do NOT update the screen with any other waveform, because this stops Xournal from recording your gestures during the update. This *should* not happen, maybe if we used a separate "refresh thread", this would work. When the screen does update (for whatever reason, eg., the user clicked the menu), the erscribble lines will disappear and be replaced by the actual lines on the canvas seamlessly. So no problems.
Right now, Xournal is responding
beautifully to pen input

There are still some bugs to work out, like the scribble driver playing "connect the dots" and stringing together everything I write (even though I reset the drawing context). I'll post the binary/code once I clean things up a bit.