davidedmundson accepted this revision.
This revision is now accepted and ready to land.
REPOSITORY
R296 KDeclarative
BRANCH
phab/guardTexture2
REVISION DETAIL
https://phabricator.kde.org/D10250
To: mart, #plasma, davidedmundson
Cc: davidedmundson, broulik, ngraham, plasma-devel, #framewor
mart updated this revision to Diff 26596.
mart added a comment.
different approach
REPOSITORY
R296 KDeclarative
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D10250?vs=26373&id=26596
BRANCH
phab/guardTexture2
REVISION DETAIL
https://phabricator.kde.org/D10250
AFFECTED FILES
davidedmundson added a comment.
My valgrind, using your test instructions is showing it is.
at 0x75B5D3C: texture (qsgtexturematerial.h:58)
by 0x75B5D3C: QSGSimpleTextureNode::texture() const
(qsgsimpletexturenode.cpp:264)
by 0x26044983: Plotter::render() (plotter.cpp:699)
mart added a comment.
> However, because it's in a managed texture node, it will get deleted when
the node dies.
> The node definitely will be killed when you switch window.
>
> *if* that's the case you're hitting, you're guarding the wrong thing, and
will need to guard the node not t
davidedmundson added a comment.
> so in that case would be a problem that potentially could come up elsewhere
as would make the logic of managedtexturenode not completely correct in those
edge cases
Textures will never be deleted by anyone else.
Docs say:
> Warning: The returne
mart added a comment.
In https://phabricator.kde.org/D10250#199624, @davidedmundson wrote:
> Good analysis on the plotter. Thanks for looking into it.
>
> > but in some rare cases, it can be deleted too by some external cause,
usually when a widget changes its parent
>
> If someon
davidedmundson requested changes to this revision.
davidedmundson added a comment.
This revision now requires changes to proceed.
Good analysis on the plotter. Thanks for looking into it.
> but in some rare cases, it can be deleted too by some external cause,
usually when a widget changes
broulik added inline comments.
INLINE COMMENTS
> managedtexturenode.cpp:42
> +{
> +if (s_d.contains(this)) {
> +delete s_d[this];
`delete s_d.take(this);`
> managedtexturenode.cpp:50
> +{
> +if (s_d.contains(this)) {
> +return s_d[this];
auto *d = s_d.value(this);
if
mart created this revision.
mart added a reviewer: Plasma.
Restricted Application added projects: Plasma, Frameworks.
Restricted Application added subscribers: Frameworks, plasma-devel.
mart requested review of this revision.
REVISION SUMMARY
the texture of ManagedTextureNode gets deleted by the