Review Request 116024: Port IconItem to native QSGTexture

David Edmundson david at davidedmundson.co.uk
Wed Feb 26 14:50:55 UTC 2014



> On Feb. 24, 2014, 4:55 p.m., Marco Martin wrote:
> > not sure how much will be visible in the end result.
> > tough if i understood correctly how it works, it does the animation by animating the opacity of the old image from 1 to 0, and the opacity of the new one from 0 to 1.
> > 
> > This is not the same thing as a crossfade, that's what it was doing.
> > I fear it will be visible the opacity of the whole result go down and then up again, especially when animating with an highlight effect (that is the same icon)
> 
> David Edmundson wrote:
>     I think it should be possible to keep that behaviour, with something like this patch.
>     
>     I would need to create a QSGMaterialShader then copy and paste the relevant fragmentShader from qtgraphicseffects. I can then put the shader directly on my texture, rather than needing the extra node.

Marco can you confirm this fading looks right.
http://paste.kde.org/p17wtna35 . It should run as a standalone in qmlscene.

For comparison the old IconItem is on the right. The animations look slightly different because my hacked example of the fragment shader doesn't have the delay waiting for the pixmap to load.

It uses a fragmentShader to do the transition. If it's OK, I'll merge this shader into the C++ code I have here as a custom material on the root node.


- David


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


On Feb. 24, 2014, 4:09 p.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116024/
> -----------------------------------------------------------
> 
> (Updated Feb. 24, 2014, 4:09 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> Port IconItem to native QSGTexture including the animation.
> This will save constantly uploading a new texture to OpenGL throughout the animation.
> 
> 
> Diffs
> -----
> 
>   src/declarativeimports/core/iconitem.h 26ee410 
>   src/declarativeimports/core/iconitem.cpp fed2f9b 
> 
> Diff: https://git.reviewboard.kde.org/r/116024/diff/
> 
> 
> Testing
> -------
> 
> Test app: http://paste.kde.org/pl5pwdnel
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140226/86f7c91c/attachment-0001.html>


More information about the Plasma-devel mailing list