Don't update when the underlying FrameSvg is repaint-blocked
ClosedPublic

Authored by hein on Dec 3 2017, 3:04 PM.

Details

Summary

When the component completes FrameSvg::setRepaintBlocked(false)
is called, which calls updateFrameData, which emits
repaintNeeded, which is connected to doUpdate anyway.

This saves one doUpdate per instanciation. The reason for that
is as follows:

  • The concept or repaint blocking is implemented in FrameSvg, which inherits from Svg.
  • The repaintNeeded signal connected to doUpdate is the one in Svg.
  • Svg code emits repaintNeeded liberally even when repaints are blocked, since it doesn't know anything about this.

Hence we check if repaints are blocked in doUpdate and abort,
implementing the QQmlParserStatus interface in the right class.

Diff Detail

Repository
R242 Plasma Framework (Library)
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
hein created this revision.Dec 3 2017, 3:04 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptDec 3 2017, 3:04 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
hein requested review of this revision.Dec 3 2017, 3:04 PM
anthonyfieroni added inline comments.
src/declarativeimports/core/framesvgitem.cpp
463 ↗(On Diff #23351)

It doesn't have d-pointer

hein updated this revision to Diff 23354.Dec 3 2017, 3:14 PM

Fix code

hein added inline comments.Dec 3 2017, 5:57 PM
src/declarativeimports/core/framesvgitem.cpp
463 ↗(On Diff #23351)

(I did a git reset and then rewrote the patch, that's how this happened ...)

davidedmundson accepted this revision.Dec 3 2017, 5:57 PM
This revision is now accepted and ready to land.Dec 3 2017, 5:57 PM
This revision was automatically updated to reflect the committed changes.