Changeset View
Changeset View
Standalone View
Standalone View
scene.cpp
Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Line(s) | |||||
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()); | ||
208 | } | 208 | } | ||
209 | QVector<Phase2Data> phase2; | 209 | QVector<Phase2Data> phase2; | ||
210 | phase2.reserve(stacking_order.size()); | ||||
210 | foreach (Window * w, stacking_order) { // bottom to top | 211 | foreach (Window * w, stacking_order) { // bottom to top | ||
211 | Toplevel* topw = w->window(); | 212 | Toplevel* topw = w->window(); | ||
212 | 213 | | |||
213 | // Reset the repaint_region. | 214 | // Reset the repaint_region. | ||
214 | // This has to be done here because many effects schedule a repaint for | 215 | // This has to be done here because many effects schedule a repaint for | ||
215 | // the next frame within Effects::prePaintWindow. | 216 | // the next frame within Effects::prePaintWindow. | ||
216 | topw->resetRepaints(); | 217 | topw->resetRepaints(); | ||
217 | 218 | | |||
Show All 27 Lines | |||||
245 | // The optimized case without any transformations at all. | 246 | // The optimized case without any transformations at all. | ||
246 | // It can paint only the requested region and can use clipping | 247 | // It can paint only the requested region and can use clipping | ||
247 | // to reduce painting and improve performance. | 248 | // to reduce painting and improve performance. | ||
248 | void Scene::paintSimpleScreen(int orig_mask, QRegion region) | 249 | void Scene::paintSimpleScreen(int orig_mask, QRegion region) | ||
249 | { | 250 | { | ||
250 | assert((orig_mask & (PAINT_SCREEN_TRANSFORMED | 251 | assert((orig_mask & (PAINT_SCREEN_TRANSFORMED | ||
251 | | PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS)) == 0); | 252 | | PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS)) == 0); | ||
252 | QVector<Phase2Data> phase2data; | 253 | QVector<Phase2Data> phase2data; | ||
254 | phase2data.reserve(stacking_order.size()); | ||||
253 | 255 | | |||
254 | QRegion dirtyArea = region; | 256 | QRegion dirtyArea = region; | ||
255 | bool opaqueFullscreen(false); | 257 | bool opaqueFullscreen(false); | ||
256 | for (int i = 0; // do prePaintWindow bottom to top | 258 | for (int i = 0; // do prePaintWindow bottom to top | ||
257 | i < stacking_order.count(); | 259 | i < stacking_order.count(); | ||
258 | ++i) { | 260 | ++i) { | ||
259 | Window* w = stacking_order[ i ]; | 261 | Window* w = stacking_order[ i ]; | ||
260 | Toplevel* topw = w->window(); | 262 | Toplevel* topw = w->window(); | ||
▲ Show 20 Lines • Show All 896 Lines • Show Last 20 Lines |