threading in in krita

Cyrille Berger cberger at cberger.net
Wed Apr 1 10:35:30 CEST 2009


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 :(

>  * 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.

-- 
Cyrille Berger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20090401/e149d73b/attachment.htm 


More information about the kimageshop mailing list