krita overview
Patrick Julien
freak at codepimps.org
Mon Oct 13 10:56:09 CEST 2003
> I think the whole point about the dirty bool is to mark a tile as
> modified if the tile is changed. If the screen is redrawn, only tiles
> which are actually modified are redrawn. Just think about a freehand
> tool that just sets a pixel. For every pixel, right now, all tiles
> have to be redrawn. Since this implies a conversion from a QImage to
> QPixmap which is supposed to be slow, it is really inefficient. If the
In Krita? No, it uses tiles, only a small section of the screen needs to be
redrawn.
> dirty-bool is set probably and the code that actually renders the
> image to the screen, respects the dirty-bool of the tiles, it only
> renders one tile at one time in the case of the freehand tool. It is
> much more efficient (I wonder why a tile size of 64 x 64 is used here?
> It would probably be better to use 32 x 32 or 16 x 16 tiles because
> then, in the case of the freehand tool, less data has to be drawn to
> the screen and for other tools, the overhead of more tiles is not that
> big, isn't it?)
The problem is, this isn't the only use case, sometimes, you do have lots of
tiles to redraw, i.e. consider hidding/showing an entire layer, X11
primitives will be much faster is your bliting bigger 64x64 instead of 32x32.
Then there is memory allocation, undo/redo, the single pixel case to modify
and other uses cases I'm sure I've forgotten by now.
>
> > low-level tile code, that's great, because I'm not interested in that,
> > and there are bound to be bugs still. If you know your way around, you
> > can fix them :-). I'm currently working on porting the real brush tool to
> > KisPainter, and reworking the user interface. That means that I'm mostly
> > messing with KisPainter.
>
> Yes. I saw your changes. drawPoint, drawLine etc. is also what I need
> to make KisLayer/KisPainter working with paintworks,
>
> > I'd really start with that right now, before trying to work out what
> > Patrick intended with his design.
>
> I think the low-level stuff is pretty clear to me. What is not clear
> is how to code tools/filters in a sane way, e.g. using kparts.
This had not been done, but is what I wanted to do, using parts for tools and
filters. Tools are still loaded statically right now.
More information about the kimageshop
mailing list