Changeset View
Changeset View
Standalone View
Standalone View
scene.cpp
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Line(s) | |||||
191 | } | 191 | } | ||
192 | 192 | | |||
193 | // the function that'll be eventually called by paintScreen() above | 193 | // the function that'll be eventually called by paintScreen() above | ||
194 | void Scene::finalPaintScreen(int mask, QRegion region, ScreenPaintData& data) | 194 | void Scene::finalPaintScreen(int mask, QRegion region, ScreenPaintData& data) | ||
195 | { | 195 | { | ||
196 | if (mask & (PAINT_SCREEN_TRANSFORMED | PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS)) | 196 | if (mask & (PAINT_SCREEN_TRANSFORMED | PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS)) | ||
197 | paintGenericScreen(mask, data); | 197 | paintGenericScreen(mask, data); | ||
198 | else | 198 | else | ||
199 | paintSimpleScreen(mask, region); | 199 | paintSimpleScreen(mask, region, data); | ||
200 | } | 200 | } | ||
201 | 201 | | |||
202 | // The generic painting code that can handle even transformations. | 202 | // The generic painting code that can handle even transformations. | ||
203 | // It simply paints bottom-to-top. | 203 | // It simply paints bottom-to-top. | ||
204 | void Scene::paintGenericScreen(int orig_mask, ScreenPaintData) | 204 | void Scene::paintGenericScreen(int orig_mask, ScreenPaintData) | ||
205 | { | 205 | { | ||
206 | if (!(orig_mask & PAINT_SCREEN_BACKGROUND_FIRST)) { | 206 | if (!(orig_mask & PAINT_SCREEN_BACKGROUND_FIRST)) { | ||
207 | paintBackground(infiniteRegion()); | 207 | paintBackground(infiniteRegion()); | ||
Show All 33 Lines | 231 | #endif | |||
241 | 241 | | |||
242 | const QSize &screenSize = screens()->size(); | 242 | const QSize &screenSize = screens()->size(); | ||
243 | damaged_region = QRegion(0, 0, screenSize.width(), screenSize.height()); | 243 | damaged_region = QRegion(0, 0, screenSize.width(), screenSize.height()); | ||
244 | } | 244 | } | ||
245 | 245 | | |||
246 | // The optimized case without any transformations at all. | 246 | // The optimized case without any transformations at all. | ||
247 | // It can paint only the requested region and can use clipping | 247 | // It can paint only the requested region and can use clipping | ||
248 | // to reduce painting and improve performance. | 248 | // to reduce painting and improve performance. | ||
249 | void Scene::paintSimpleScreen(int orig_mask, QRegion region) | 249 | void Scene::paintSimpleScreen(int orig_mask, QRegion region, const ScreenPaintData &/*data*/) | ||
250 | { | 250 | { | ||
251 | assert((orig_mask & (PAINT_SCREEN_TRANSFORMED | 251 | assert((orig_mask & (PAINT_SCREEN_TRANSFORMED | ||
252 | | PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS)) == 0); | 252 | | PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS)) == 0); | ||
253 | QVector<Phase2Data> phase2data; | 253 | QVector<Phase2Data> phase2data; | ||
254 | phase2data.reserve(stacking_order.size()); | 254 | phase2data.reserve(stacking_order.size()); | ||
255 | 255 | | |||
256 | QRegion dirtyArea = region; | 256 | QRegion dirtyArea = region; | ||
257 | bool opaqueFullscreen(false); | 257 | bool opaqueFullscreen(false); | ||
▲ Show 20 Lines • Show All 900 Lines • Show Last 20 Lines |