canvas: backing store, etc
bulia's work with canvas has inspired me to take a look at canvas code myself, and I've noticed one area where we could probably do better is to start using a persistent backing store for the canvas widget.
Of course, X is supposed to provide that (although in XFree86 the backing store facility has been broken for years). So, I don't know -- is this something we should bother with ourselves, or rely on X to fix it eventually? It looks like we don't get a backing store on Windows either, though.
Also, I think I've found another reason (besides cache effects) why increasing the tile size beyond 1M decreases painting performance: there is an optimization in the tile code such that if the entire tile is empty, it gets drawn with a rectangular fill instead of a blit.
The larger the tile size, the less likely the optimization is to be employed. Probably also one of the other reasons why Lauris went with the small tile size (though as bulia has demonstrated, it was TOO small).
I wonder if there's a way to take advantage of this optimization without having to re-tesselate for every single tile? Nathan suggested keeping a BSP once, which would be one option, but I'm not sure how to (efficiently) get there from livarot.
Ideally, we should be able to tesellate once for the entire viewport, and then selectively blit/fill regions of that.
-mental
participants (1)
-
unknown@example.com