Drop Phase2Data constructors

Summary:
We initialize all fields of Phase2Data at once, so the constructors seem
to be redundant.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18207
This commit is contained in:
Vlad Zagorodniy 2019-01-12 14:39:28 +02:00
parent 33c7edaaf4
commit 7934c03ac2
2 changed files with 3 additions and 9 deletions

View file

@ -232,7 +232,7 @@ void Scene::paintGenericScreen(int orig_mask, ScreenPaintData)
if (!w->isPaintingEnabled()) {
continue;
}
phase2.append(Phase2Data(w, infiniteRegion(), data.clip, data.mask, data.quads));
phase2.append({w, infiniteRegion(), data.clip, data.mask, data.quads});
}
foreach (const Phase2Data & d, phase2) {

10
scene.h
View file

@ -228,16 +228,10 @@ protected:
void updateTimeDiff();
// saved data for 2nd pass of optimized screen painting
struct Phase2Data {
Phase2Data(Window* w, QRegion r, QRegion c, int m, const WindowQuadList& q)
: window(w), region(r), clip(c), mask(m), quads(q) {}
Phase2Data() {
window = 0;
mask = 0;
}
Window* window;
Window *window = nullptr;
QRegion region;
QRegion clip;
int mask;
int mask = 0;
WindowQuadList quads;
};
// The region which actually has been painted by paintScreen() and should be