Review Request 115923: Render SvgItem natively rather than going through QQuickPaintedItem

David Edmundson david at davidedmundson.co.uk
Tue Feb 25 17:00:22 UTC 2014



> On Feb. 21, 2014, 11:18 p.m., Sebastian Kügler wrote:
> > I've run your native_render_frame branch for a bit, some observations on my system:
> > 
> > - It mostly works
> > - taskbar doesn't find some elements in the svg, leading to lots of messages like this:
> > plasma_shell(11872)/default QSvgTinyDocument::draw: Couldn't find node normalbottomright. Skipping rendering.
> > - we seem to be hitting a few slow code pathes, which mean that I'm getting some smaller and longer freezes
> > - memory usage has gone up quite a bit, from 178MB to 328MB
> > - I'm seeing lots of threads of plasma-shell in ps
> > 
> > I like the idea, though, and I think those issues are something that can be sorted out. Looking at the code, it looks pretty clean so far, so nice work!
> 
> David Edmundson wrote:
>     Aye, it turns out there's a reason Plasma::FrameSVG is really big; and I'm basically recreating the most complex method inside that branch. Note that branch contains a lot more stuff than that's in this review. 
>     
>     I need to fold back the things I've improved/learned from this review into that frame branch.
>     
>     I'm going to try to IconItem next I think, it's less menacing, but contains an animation which is exciting.

This code is pushed in the branch davidedmundson/svgrendering for testing.

it is _not_ the same as the native_render_frame branch. 


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115923/#review50494
-----------------------------------------------------------


On Feb. 21, 2014, 3:32 p.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115923/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2014, 3:32 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> The rationale behind this patch is on the mailing list in the thread "Minutes Monday" 
> 
> This doesn't boost performance or save memory much, but it paves the way for texture sharing, faster resizing, and plenty of other things.
> 
> Based on Frederick's comment I have reverted my changes to use QImage everywhere, otherwise we lose out on the local QPixmap cache in KImageCache.
> Changes to plasmacore are minimal.
> 
> I'm currently porting FrameSVG which is where we should see more gains, but I thought I should get this reviewed/merged in parallel.
> 
> I have only seen one regression which is in the analog clock.
> Some odd code in the analog clock (by me apparently!) means the width is dependent on the current width, which due to some changes in this patch ends up in a constant spiral getting to infinitely sized and explode.  
> 
> 
> Changelog (in reverse order):
> Remove manual isDirty tracking in SvgItem
> Always resize the node geometry on resizes
> Update to paint to fill the size of the object, not the size of texture
> Fix leaking texture
> Add convenient QImage image() getter in SVG
> Avoid repainting if node is not changed
> Render SvgItem natively rather than going through QQuickPaintedItem
> 
> 
> Diffs
> -----
> 
>   src/declarativeimports/core/svgitem.h c8be7cc 
>   src/declarativeimports/core/svgitem.cpp e90751a 
>   src/plasma/svg.h 01d98f8 
>   src/plasma/svg.cpp 9ec2aa5 
> 
> Diff: https://git.reviewboard.kde.org/r/115923/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140225/e18993cc/attachment.html>


More information about the Plasma-devel mailing list