Redrawing the picture on window expose

Boudewijn Rempt boud at valdyas.org
Thu Sep 16 22:23:44 CEST 2004


On Friday 03 September 2004 23:22, Adrian Page wrote:
> On Friday 03 September 2004 8:42 pm, Boudewijn Rempt wrote:
> > I just noticed that when a Krita window is obscured, and then exposed
> > again, we go through the complete compose & render routine again. How
> > hard would it be to cache the QImage and restore that on window expose?
>
> It shouldn't be too hard. It's probably best to maintain a canvas-sized
> QPixmap which is updated on invalidating a rectangle, then we use that to
> draw the contents in paint events. I'll have a look at it.
>

If we have that, we can get rid of the projection is kis_image, which is as 
big or bigger as the biggest layer, and which, I feel, is responsible for
quite a few of our display artefacts. Just maintain the QPixmap, which 
consists of the composed layers, and only compose the regions actually 
damaged by Krita activity.

Are you working on this? Otherwise I might take a stab at it.

-- 
Boudewijn Rempt | "Geef mij maar zuurtjes."
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20040916/ce588cec/attachment.pgp


More information about the kimageshop mailing list