Mipmapping for canvas. Ideas and comments.
Boudewijn Rempt
boud at valdyas.org
Wed Jul 22 08:11:13 CEST 2009
On Tuesday 21 July 2009, C. Boemann wrote:
> On Tuesday 21 July 2009 12:43:12 Dmitry Kazakov wrote:
> > I think the second variant is better. At least for the beginning. So
>
> I do too :)
>
> > There are some points where i'm in doubt now:
> >
> > 1) Should we use KisProjectionCache for storing original image?
> > I guess not, because it could be used much in
> > drawScaledImage much.
>
> well we should store the basic non scaled version in the pyramid too.
>
> > 2) Which zoom-levels should be stored inside m_pyramid? I saw that
> > when you press Ctrl+'+'/'-' Krita switches across some finite number
> > of levels. Which part of Krita/Koffice decides, which levels to use? I
> > guess, these levels and levels in m_pyramid should agree :)
>
> Ko zoomcontroller action (whatever it's called now). It used to be in gui
> utils
>
> > 3) KisPresceledProjection::Private::prescaledQImage vs
> > KisPresceledProjection::Private::prescaledQPixmap?
> > What is the difference and where are they mostly used?
>
> Pixmaps reside on the xserver and are fast to paint over and over again
> Images reside on the client and are good if you need to poke at the pixels
> or change it every time you display it
There is also the difference between xrender capable systems and non-xrender
capable systems. If I remember correctly, we use QImage by preference, but if
xrender isn't available, we use QPixmap.
> An image will be converted to a pixmap internally before being drawn on
> your screen, and this conversion is usually quite expensive.
>
> As to the levels and scaleX/scaleY. I think that the pyramid should just
> scale with a factor of 2 (in both x and y) for each step. You should then
> take the closest image and apply the scaleX/scaleY.
>
> Good work so far :)
> _______________________________________________
> kimageshop mailing list
> kimageshop at kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
--
Boudewijn Rempt | http://www.valdyas.org
More information about the kimageshop
mailing list