(no subject)

Boudewijn Rempt boud at valdyas.org
Fri Dec 26 16:15:19 CET 2003


On Wednesday 24 December 2003 23:05, Patrick Julien wrote:

(This more or less a repeat of what I accidentally mailed Patrick, instead of 
sending it to the list. I'd like to preserve a trail of what I have been 
doing and why I've been doing things for posterity.)
>
> Hmm, I don't believe that KMacroCommand would be too slow, oh well, maybe. 
>  I would like to investigate this a bit when I come back from vacation.
>

I think the problem is with the explicit notify() in each KisTileCommand; 
those notifies are what makes it slow. But there is another good reason for 
using a single KisTileCommand instead of aggregating KisTileCommands in a 
KMacroCommand: memory usage. We only need to store each tainted tile twice: 
once for the original state, once for the state after the transaction is 
ended. Aggregating KisTileCommands means story the tile twice for every 
action that touches the tile, and that will happen a lot when doing freehand 
painting.

> I would suggest that you reuse the same painter without a pointer in your
> brush tool. Simply call begin/end instead of new and delete.  You have a
> crash in waiting due to how mousePress doesn't reset m_painter to 0 after
> delete.

I I think I have fixed that, before commiting. I committed

>
> You won't get any arguments from me here, the problem is actually about
> Krita actually does refreshes, it just too much work for the developer
> right now. I need to actually sit down and fix this before they are too
> many tools to break :).

:-). I promise not to start working on other tools before this brush is 
feature complete. Although I am contemplating giving in to the kids' nagging 
and do a 'silly brush' tool that has all the conceptual mistakes I've made -- 
painting actually thins out the the colour (use COMPOSITE_OVER instead of 
COMPOSITE_NORMAL), animated undo/redo.

>
> Done.  However. please note that I'm usually more thorough, but I had to do
> this more hastily this time so no finger pointing if it doesn't compile,
> but the strategy is the right one.

It compiles and works...

>
> > Anyway, because of this, and because I have a precognition that I might
> > have missed something important, I've just attached the diff instead of
> > blithely committing. (I've also removed the QPainter based methods I did
> > in September or so, when I was learning Krita -- those were obsolete).
>
> I think you have committed by now.

Yes, I wanted to post that I was going to commit, but apparently forgot. I 
wanted to continue -- I'm having a few days off now, and I should find some 
time to work on Krita. 

-- 
Boudewijn Rempt | http://www.valdyas.org/index2.html


More information about the kimageshop mailing list