[IconItem] Use ItemSceneHasChanged rather than connect on windowChanged
ClosedPublic

Authored by broulik on Dec 2 2017, 5:03 PM.

Details

Summary

Saves a connection and also only schedule if we actually have a window

Test Plan

schedulePixmapUpdate is now called 100 times on plasma startup for me instead of 120. Icons still looking fine. I'm not sure what the implications of calling polish, are especially without a window, but it's a slight optimization anyways as we make use of itemChange already

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Dec 2 2017, 5:03 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptDec 2 2017, 5:03 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
broulik requested review of this revision.Dec 2 2017, 5:03 PM
davidedmundson accepted this revision.Dec 2 2017, 5:09 PM
davidedmundson added a subscriber: davidedmundson.

The render loop is responsible for calling polish, I don't think it will without a window.

I can't this really making a difference. ..but nor any harm.

This revision is now accepted and ready to land.Dec 2 2017, 5:09 PM
This revision was automatically updated to reflect the committed changes.