Mipmapping for canvas. Ideas and comments.

C. Boemann cbo at boemann.dk
Thu Jul 23 12:25:16 CEST 2009


On Thursday 23 July 2009 12:15:11 Dmitry Kazakov wrote:
> >> The reason why i wanted to add it to prescaled projection - i didn't
> >> want to add an additional layer of abstraction (additional obstacle in
> >> image's way). It can create an additional delay before returning
> >> scaled image. KisPrescaledProjection won't get an image until
> >> KisProjectionPyramid finishes build of all images.
> >
> > Well, splitting would mean two classes, but also a clear separation of
> > concerns: KisPrescaledCache would have the right cache for the 
canvas,
> > KisProjectionPyramid would be responsible for scaling.
> >
> > KisPrescaledCache is already one of the thorniest classes in Krita,
> > adding stuff there is really not recommended.
>
> Then, KisProjectionPyramid should replace KisProjectionCache. And
> KisPrescaledProjection would request downsampled images from the
> pyramid. It would be logical and with "clear separation of concerns"
> =)
>
> krita/image is not a proper place for pyramid as the latter one needs
> 'monitor profile' to convert paintDevice to QImage. The only solution
> to leaving pyramid inside image/ is to make it use KisPaintDevice. But
> paintDevice's tiles are too small for that purpose =)
>
> Btw, i'm afraid of that tiles inside pyramid can degrade perfomance, can't
> they?
The tiles are not too small at all.

just let one tile on a hight level cover 4 tiles on the level below. voila and 
it will work.

tiles are needed for large pictures anyway


More information about the kimageshop mailing list