move setImagePath logic into updateFrameData()
ClosedPublic

Authored by mart on Feb 21 2017, 3:20 PM.

Details

Summary

make sure the framedata creation/destruction is
completely in updateFrameData, makes easier to track
and possible to use the repaintsblocked logic.
now only one framedata instance should be created at startup.

CCBUG:376754

Test Plan
  • autotests pass, plasma runs ok, crash on 376754 not reproducible anymore
  • possible to have a plasmashell session start without the creation of a single svg renderer (startups after the first when the cache is generated)
  • on qml profiler, framesvgitem creation is ~12 msecs the first one created, ~2-300 musecs the subsequent ones, seems to be a bit better than before the whole refactor started
  • tried against the latest patches that remove the binding loops, still correct rendering and no binding loop
  • tried with both empty and existing cache in place

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.
mart created this revision.Feb 21 2017, 3:20 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 21 2017, 3:20 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
mart planned changes to this revision.Feb 21 2017, 3:20 PM
mart updated this revision to Diff 11593.Feb 21 2017, 4:31 PM
  • less svg renderer creation
mart planned changes to this revision.Feb 21 2017, 4:31 PM
mart edited the test plan for this revision. (Show Details)Feb 21 2017, 4:42 PM
mart requested review of this revision.Feb 22 2017, 3:42 PM
mart edited the test plan for this revision. (Show Details)
mart added a reviewer: Plasma.
mart updated this revision to Diff 11627.Feb 22 2017, 3:45 PM

remove useless variable

Restricted Application added a project: Plasma. · View Herald TranscriptFeb 22 2017, 3:45 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart edited the test plan for this revision. (Show Details)Feb 22 2017, 3:47 PM
mart updated this revision to Diff 11632.Feb 22 2017, 4:11 PM
  • more guards on null frame
davidedmundson added inline comments.
src/plasma/framesvg.cpp
808

I don't understand this and the FrameData part of this change.

q->imagePath() will still always be correct as before, you still set that in setImagePath() regardless of whether we are blocking updates or not.

mart added inline comments.Feb 28 2017, 11:57 AM
src/plasma/framesvg.cpp
808

i need this because one check, in updateFrameData() can have the following situation:

imagepath was updated during repaintBlocked, so q->imagePAth() becomes different from frameData->imagePath

from line 670 we temporarly assign the new values to framedata, so we can compare the two keys (we don't know which among enabledBorders, frameSize and imagePath changed, if any)

so i need to generate a cacheid with imagePath eventually in some cases different from q->imagePath()

davidedmundson accepted this revision.Feb 28 2017, 12:27 PM
This revision is now accepted and ready to land.Feb 28 2017, 12:27 PM
This revision was automatically updated to reflect the committed changes.