recomposition redesign

Boudewijn Rempt boud at
Sun Mar 2 11:47:32 CET 2008


Even with Qt4.4, QRegion is pretty crashy. Whether we're using it the wrong 
way, or whether it is intriniscally unsuitable for what we're doing with it, 
I don't know, but I've decided to try another approach:

* Give every node a KisProjection.
* If a node is dirtied, it notifies its KisProjection
* The KisProjection starts as many chunked update jobs as necessary for the 
dirty area
* the jobs call updateProjection on the node
* Possibly, updateProjection checks whether there is a node underneath that 
caches the composited stack completely (i.e., an adjustment layer) and starts 
composition from there, else from the bottom
* whenever a job is ready, it notifies the parent node that it is dirty, and 
the whole process starts again at a higher level
* until we arrive at the root group layer, when that's clear, we update the 

This is pretty generic and allows us to nest masks, even: we lose the 
advantage of having a thread work on the same data until the whole stack is 
done, so we may lose cache locality. We do get rid of the dirty region 
administration in the nodes, which should fix the crashes. I'm also not sure 
how to implement the roi feature (that was never activated anyway) where we 
give priority to updating the visible area of the image.

Boudewijn Rempt

More information about the kimageshop mailing list