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 33c7edaa authored by Martin Flöser's avatar Martin Flöser

Use reserve on QVector<Phase2Data>

We know that the maximum size is the number of windows in stacking
order. It might be that some are skipped as they are not ready for
painting, but overall it's better to reserve a little bit too much
memory than to have a growing QVector.

Test Plan: Compiles

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent d17a3ff8
......@@ -207,6 +207,7 @@ void Scene::paintGenericScreen(int orig_mask, ScreenPaintData)
QVector<Phase2Data> phase2;
foreach (Window * w, stacking_order) { // bottom to top
Toplevel* topw = w->window();
......@@ -250,6 +251,7 @@ void Scene::paintSimpleScreen(int orig_mask, QRegion region)
assert((orig_mask & (PAINT_SCREEN_TRANSFORMED
QVector<Phase2Data> phase2data;
QRegion dirtyArea = region;
bool opaqueFullscreen(false);
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