zzag added a comment.

  In D13384#275224 <https://phabricator.kde.org/D13384#275224>, @zzag wrote:
  
  > Corner case: what if only need to update cachedBackground(i.e. 
enabledBorders and frameSize are okay)?
  
  
  Delete `shouldUpdate` and wrap if (refcount() == 1) {} into another if 
statement, e.g.
  
    if (maskFrame->enabledBorders != frame->enabledBorders || 
maskFrame->frameSize != frameSize(frame)) {
        if (maskFrame->refcount() == 1) {
            // ...
        } else {
            // ...
        }
        updateSizes(maskFrame);
    }
    
    if (maskFrame->cachedBackground.isNull()) {
        generateBackground(maskFrame);
    }
    
    return maskFrame->cachedBackground;
  
  ?

REPOSITORY
  R242 Plasma Framework (Library)

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

To: zzag, #plasma, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns

Reply via email to