[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Caching of shapes
From: Thomas Zander <zander () kde ! org>
Date: 2007-10-30 16:05:51
Message-ID: 200710301705.51563.zander () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Tuesday 30 October 2007 16:40:30 Johannes Simon wrote:
> Am Dienstag, den 30.10.2007, 10:54 +0100 schrieb Thomas Zander:
> > This leads to some questions;
> > * does the chart shape optimize redrawing?
> > This means;
> > o only call update() for the areas that need it (i.e use the QRectF
> > arg)
>
> The chart shape currently doesn't have an update(QRectF) method. At what
> point, other than shape-internally, is that function used?
Sure you do, its a method on the KoShape class.
> > * Will this be useful for shapes other then the chart shape, painting
> > text turned out to be fast enough and painting a krita shape is already
> > cached internally (etc), so a shape should be able to turn it off for
> > sure. But I just want to check if its worth it for shapes other then the
> > kchart one.
>
> Neither the text shape, nor a simple eclipse path shape, nor any other
> shape repaints at an acceptable speed at zoom levels of >=200%.
Interresting, on my 2 years old laptop I have no problems with painting speed
at all (and this laptop makes Krita crawl).
How do you define 'acceptable speed' ?
> I'm not sure if we need a KoRepaintManager. In KoShape, there's
> basically four things we need:
> * a pixmap
That can't work, a shape holds the data for any number of views, and naturally
you don't want a 2000% zoomed pixmap to be painted on a 15% zoomed view. So
the pixmap has to be cached outside of the shape. Which is what the repaint
manager was there for.
> * a method that marks this cache as invalid
That is exactly what the old one already did; it marked it invalid as soon as
the user called one of the KoShape::update() methods.
> * a paint() function that paints the pixmap onto the screen, and
> updates it if requested
> * and an optional method that disables caching
So, I agree on your approach in general lines. But I still think you should
look at the repaintManager since those ideas at one point have been coded
into that some time ago :)
--
Thomas Zander
["signature.asc" (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic