[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Caching of shapes
From:       Johannes Simon <johannes.simon () gmail ! com>
Date:       2007-10-30 15:40:30
Message-ID: 1193758830.25139.34.camel () Speedstar
[Download RAW message or body]


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?

>   o in the paint event use the cliprect of the event to avoid painting stuff 
> that doesn't need to be painted.
Yes.

> * can we develop this in a separate branch or somesuch to make sure it can be 
> delayed to KOffice2.1 if the new feature is not finished in time (so we don't 
> need to delay the release for it, we delay the feature instead).
I don't think we need to since this shouldn't take too long to
integrate. We could disable caching by default and have the shapes
enable it one after one as soon as they support it.

> * 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%. That is, on my
computer of course, but 2GHz should suffice.

> [...]
> where I routed shape-requested repaints (now called updates) to be able to 
> mark a cache as invalid.
I'm not sure if we need a KoRepaintManager. In KoShape, there's
basically four things we need:
 * a pixmap
 * a method that marks this cache as invalid
 * a paint() function that paints the pixmap onto the screen, and
updates it if requested
 * and an optional method that disables caching

 - Joh

_______________________________________________
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