threading in in krita

Boudewijn Rempt boud at valdyas.org
Wed Apr 1 10:47:47 CEST 2009


On Wed, 1 Apr 2009, Cyrille Berger wrote:

> On Tuesday 31 March 2009, Boudewijn Rempt wrote:
> >  * KisThreadedApplicator: this takes a paint device and (optionally)
> > divides it into areas and applies a KisJob to it. Only filters
> > currently use this. Right now, a job in KisThreadedApplicator cannot
> > be cancelled, and the way filters use it isn't safe, because
> > KisFilterHandler can be entered before the theaded applicator is done.
> > Because of a clash with KoUpdater, we need to disable this for all
> > filters for 2.0 :-(.
> 
> Actually, the real clash is between KisFilterMask and KoUpdater (while 
> painting on a layer), for which the only "fix" I found so far was not 
> compatible with KisThreadedApplicator :(

Well, given that there are queued signals now in Qt, the usage of KoAction
in KoUpdater is completely superfluous.

> >  * We used to use ThreadWeaver to recompute the thumbnails in the
> > filters gallery, however that got replaced by lazy creation of
> > thumbnails in KisFiltersModel. (At least, I hope it's lazy!)
> 
> It should, otherwise there is a bug in Qt's view. But the way I wrote it, the 
> thumbnail should only be created when the view ask the model for the 
> thumbnail. That said, we could still have thread there:
> 1) view ask for thumbnail
> 2) model doesn't have it (yet), send an icon instead, and start a threaded 
> creation of thumbnail
> 3) creation is finished, model tells view that data has been updated
> 
> Not sure if it is worth the effort.

Don't think so -- it performs well enough as it is.

Boudewijn



More information about the kimageshop mailing list