Patch for thumbnail update in layerbox

Adam C. nospam at xibo.at
Sun Sep 19 10:53:37 CEST 2010


Is it possible to change the backend in that way, that a non gui thread  
can read a projection or node?
That would be ideal for selector, layerbox, bird eye view and maybe also  
filterlayer.

i imagine, that it is possible by locking tiles while writing and a  
transaction system (while reading tile a, tile b is updated, the reader  
should then read the old version of tile b). on the other hand it doesn't  
matter for the first three use cases, if they read "blocky" data.

i don't know, how complicated the system is. maybe i'm naive..


On Sun, 19 Sep 2010 08:10:47 +0200, Dmitry Kazakov <dimula73 at gmail.com>  
wrote:

>>
>> The the KisNodeGraphListener is extended by a method to notify about  
>> node
>> changes. Nodes call it when the systemLocked is turned off. I used
>> systemLocked as it only called once an operation is finished, so we  
>> don't do
>> updates that are not needed.
>> The node model manages a queue for the nodes that will be updated after  
>> a
>> one second timeout.
>>
>> Any comments?
>>
>
> I have two comments about this:
> 1) I don't think it is very good to use systemLocked call for this. I'm  
> not
> sure this ability (to lock the system) should live in future releases.  
> It's
> not good idea to block UI for any reason. So i temped to deprecate it in  
> the
> future.
> 2) You do not check whether the nodes in the queue are unique or not.
>
>
> I think you can use sigImageUpdated (but to check it is executed after
> canvas update). And then use QSet<KisNodeSP> for unique set of nodes.
>
> Actually, i think, the ability to emit delayed update signals should be
> added to KisImage(or KisNodeGraphListener), because at this very moment  
> we
> have at least two potential users of it: KisToolBox's thumbnails and  
> Adam's
> color selectors. There is a small problem in implementing this: they  
> need a
> bit different information about updates, but i think they can be made in  
> the
> same way.
>
> KisToolBox: needs pointers to dirty nodes
> Selectors: need updated rects of the projection
>
> So there may be a hash table of pairs node-region and one special region  
> for
> projection. KisNodeGraphListener will emit two signals:
> sigProjectionChangedDelayed(QRegion) and
> sigNodeChangedDelayed(QHash<KisNodeSP,QRegion>)
>


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the kimageshop mailing list