Review Request 119274: Use Atlas textures in SvgItem

David Edmundson david at davidedmundson.co.uk
Tue Jul 15 10:04:08 UTC 2014



> On July 14, 2014, 11:01 p.m., Aleix Pol Gonzalez wrote:
> > Can we get some advertisement about why Atlas is better?
> > 
> > /me wants numbers. Faster? Less memory consumption?
> 
> Martin Gräßlin wrote:
>     it means we have one texture instead of many and that reduces state changes which is always a good thing in OpenGL. Tried to google for a good resource, best I found is https://developer.apple.com/library/ios/documentation/3ddrawing/conceptual/opengles_programmingguide/TechniquesForWorkingWithTextureData/TechniquesForWorkingWithTextureData.html

Pretty much. There's a massive texture (size changeable with environment variables. Mine appears to be 2048x2048 in apitrace) Qt puts lots of tiny textures (up to 512x512 I think) there. The QSGTexture points to the textureId of the atlas and says which rectangle of that is our texture. QSGSimpleTextureNode, which we use internally handles using that for us.

With just this ported, it's not a great saving. We end up creating a massive space and not using a lot (note, I think using Image would also create this space anyway).  On startup I only get about 14 things in the atlas. 

With IconItem and FrameSVG too, we'd get a bigger saving. Less fragmentation and less openGL calls.


- David


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


On July 14, 2014, 2:27 p.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119274/
> -----------------------------------------------------------
> 
> (Updated July 14, 2014, 2:27 p.m.)
> 
> 
> Review request for KDE Frameworks and Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> If SvgItem size is 0, remove any nodes in the scenegraph
> Use Atlas textures
> 
> 
> Diffs
> -----
> 
>   src/declarativeimports/core/svgitem.cpp 1ed0631 
> 
> Diff: https://git.reviewboard.kde.org/r/119274/diff/
> 
> 
> Testing
> -------
> 
> Ran QSG_ATLAS_OVERLAY=1 plasmashell  checked some things were now painted blue.
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140715/07b8ef91/attachment.html>


More information about the Kde-frameworks-devel mailing list