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 (!d) {
      d = new ManagedTextureNodePrivate();
      s_d.insert(this, d);
  }
  return d;

> managedtexturenode.cpp:68
> +{
> +    return d_ptr()->textureTracker;
> +}

Can you perhaps prevent creation of the `ManagedTextureNodePrivate` for this 
check? `d_ptr()` would create it just to then see that its `textureTracker` is 
`null`. (Might be worth profiling, though)

REPOSITORY
  R296 KDeclarative

REVISION DETAIL
  https://phabricator.kde.org/D10250

To: mart, #plasma
Cc: broulik, ngraham, plasma-devel, #frameworks, michaelh, ZrenBot, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

Reply via email to