Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 4fa98b32 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

Simplify paintSimpleScreen

Phase2Data already includes the scene window, so we don't have to store
it again in QPair.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent 81781683
......@@ -249,7 +249,7 @@ void Scene::paintSimpleScreen(int orig_mask, QRegion region)
assert((orig_mask & (PAINT_SCREEN_TRANSFORMED
QList< QPair< Window*, Phase2Data > > phase2data;
QVector<Phase2Data> phase2data;
QRegion dirtyArea = region;
bool opaqueFullscreen(false);
......@@ -308,8 +308,7 @@ void Scene::paintSimpleScreen(int orig_mask, QRegion region)
dirtyArea |= data.paint;
// Schedule the window for painting
phase2data.append(QPair< Window*, Phase2Data >(w,Phase2Data(w, data.paint, data.clip,
data.mask, data.quads)));
phase2data.append({w, data.paint, data.clip, data.mask, data.quads});
// Save the part of the repaint region that's exclusively rendered to
......@@ -331,8 +330,7 @@ void Scene::paintSimpleScreen(int orig_mask, QRegion region)
// This is the occlusion culling pass
for (int i = phase2data.count() - 1; i >= 0; --i) {
QPair< Window*, Phase2Data > *entry = &phase2data[i];
Phase2Data *data = &entry->second;
Phase2Data *data = &phase2data[i];
if (fullRepaint)
data->region = displayRegion;
......@@ -365,7 +363,7 @@ void Scene::paintSimpleScreen(int orig_mask, QRegion region)
// Now walk the list bottom to top and draw the windows.
for (int i = 0; i < phase2data.count(); ++i) {
Phase2Data *data = &phase2data[i].second;
Phase2Data *data = &phase2data[i];
// add all regions which have been drawn so far
paintedArea |= data->region;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment