Integrating Gwenview in kdegraphics?

Boudewijn Rempt boud at valdyas.org
Tue Jan 16 19:47:38 GMT 2007


On Tuesday 16 January 2007 19:59, Lubos Lunak wrote:
> On Tuesday 16 January 2007 18:01, Aurélien Gâteau wrote:
> > Boudewijn Rempt wrote:
> > > A small part has been ported: I've just ported a chunk of the scale
> > > code for use in Krita :-). One word of warning: with Qt4, croppedqimage
> > > is no longer necessary, and indeed, doesn't work anymore. But
> > > QImage::copy is now really fast.
> >
> > Oh nice, I guess Lubos will be happy. it's mainly his work.
>
>  I'll believe that when I benchmark that :). Seriously, actually. IIRC what
> was slow was just moving the image data around (think waaaay large images)
> and I don't see how that could be made any faster.

Apparently that doesn't happen anymore until one writes to the image. The 
jumptable trick doesn't work anymore, but I get consistent number of around 
2 ms for copying even of large images -- ie, for a 5120x1024 image on a 
700x500-ish viewport:

krita (render): Paint event: QRect(0,0 717x555)
krita (render): Painting checks:2
krita (render): Copying subrect:0
krita (render): Scaling subimage: 75
krita (render): painting image: 50
krita (render): putting pixmap on widget 0
krita (render): Done painting tool stuff 0
krita (render): Paint event: QRect(0,0 701x539)
krita (render): Painting checks:0
krita (render): Copying subrect:1
krita (render): Scaling subimage: 67
krita (render): painting image: 42
krita (render): putting pixmap on widget 0
krita (render): Done painting tool stuff 0
krita (render): Paint event: QRect(0,0 701x539)
krita (render): Painting checks:0
krita (render): Copying subrect:2
krita (render): Scaling subimage: 132
krita (render): painting image: 30
krita (render): putting pixmap on widget 0
krita (render): Done painting tool stuff 0

(I first paint the checks on a pixmap, then copy the to-be-scaled subrect of 
the image, scale it (without mmx, because I cannot get the asm file to link 
with cmake), paint the scaled rect on the pixmap, paint the pixmap on the 
widget and then paint tool lines and so on. Letting Qt scale the qimage in 
the painter takes about 500ms.)

-- 
Boudewijn Rempt 
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/kde-core-devel/attachments/20070116/392680cc/attachment.sig>


More information about the kde-core-devel mailing list