[Panel-devel] svg rendering

Sean Harmer sh at theharmers.co.uk
Wed Oct 31 02:26:58 CET 2007


On Tuesday 30 October 2007 19:07:22 Aaron J. Seigo wrote:
> a simple Svg::hasText(bool) method would allow the lib to work around this
> problem transparently to applets, right? in 4.0 it could disable threaded
> rendering for that Svg object, and in 4.1 it could do ... nothing. =)

OK I've done this now. Please find the latest copy of my patch. I would 
appreciate it if people could give this a quick test drive. It is quite 
useable at this point in time and if you are lucky enough to have multiple 
cores and lots of SVGs you should get a boost. Issues that I know about are:

* Applet notification. Applets are not receiving notification of when the 
rendered svg's are ready for use. Even if they were connected up to the 
appropriate slot, some applets may require small changes to get results 
pleasing to the eye. i.e. No point in drawing only one quarter of the 
standard theme applet background. May as well wait until all parts of it are 
ready.

* Portions of svg's which get rendered by means of their elementId tags are 
not correctly scaled at present. I think I know where this problem is and 
will fix this next.

* Cacheing. At present each Plasma::Svg object caches all of the images it is 
asked to render. Also SvgRendererManager never expires older renderer's at 
the moment. This will get fixed soon. Hey, it's fast but memory usage grows 
everytime a new SVG is rendered.

* I've added a function to Plasma::Svg to paint only the dirty rects rather 
than the entire SVG but I've not modified any applets to take advantage of 
this yet and so it is completely untested.

Cheers,

Sean


-------------- next part --------------
A non-text attachment was scrubbed...
Name: svg-threading.patch
Type: text/x-diff
Size: 39291 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071031/88abf9da/attachment-0001.bin 


More information about the Panel-devel mailing list