From 253b0ed808e28c32b2e61a2c3457e4d306a3e1be Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 17 Feb 2022 12:16:29 +0200 Subject: [PATCH] scene: Rename Phase2Data::clip to Phase2Data::opaque It makes code easier to understand. --- src/scene.cpp | 8 ++++---- src/scene.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scene.cpp b/src/scene.cpp index 6e5cd3c70e..e1f73c8acb 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -346,7 +346,7 @@ void Scene::preparePaintGenericScreen() m_paintContext.phase2Data.append(Phase2Data{ .window = sceneWindow, .region = infiniteRegion(), - .clip = data.clip, + .opaque = data.clip, .mask = data.mask, }); } @@ -392,7 +392,7 @@ void Scene::preparePaintSimpleScreen() m_paintContext.phase2Data.append(Phase2Data{ .window = sceneWindow, .region = data.paint, - .clip = data.clip, + .opaque = data.clip, .mask = data.mask, }); } @@ -405,7 +405,7 @@ void Scene::preparePaintSimpleScreen() const auto &paintData = m_paintContext.phase2Data.at(i); surfaceDamage += paintData.region - opaque; if (!(paintData.mask & PAINT_WINDOW_TRANSLUCENT)) { - opaque += paintData.clip; + opaque += paintData.opaque; } } @@ -554,7 +554,7 @@ void Scene::paintSimpleScreen(int, const QRegion ®ion) data->region = visible & item->mapToGlobal(item->boundingRect()); if (!(data->mask & PAINT_WINDOW_TRANSLUCENT)) { - visible -= data->clip; + visible -= data->opaque; } } diff --git a/src/scene.h b/src/scene.h index 17e0c018e7..da61edc611 100644 --- a/src/scene.h +++ b/src/scene.h @@ -250,7 +250,7 @@ protected: struct Phase2Data { Window *window = nullptr; QRegion region; - QRegion clip; + QRegion opaque; int mask = 0; };