I've just pushed the wip/simple-draw4 branch which is the latest
version of my work trying to simplify and modernize the Gtk drawing
machinery. Its now in a state where I think its time to discuss the
merging of this.
Now it just invalidates the entire
scrolled area and redraws it.
. Secondly, in a more "modern"
scene graph like in recent gtk3 most windows have alpha pixels and
render over the window background rather than each window rendering
its own opaque background, so scrolling via copy doesn't work.
A more modern way to do scrolling is to keep an offscreen buffer for
the content inside the scrolling region, covering what is currently
visible in the viewport plus a bit more. Then when we draw the window
we just draw the buffer in the right place, making scrolling very fast.
Although if you scroll to far we have to render a new piece of the
offscreen buffer.