Changeset View
Changeset View
Standalone View
Standalone View
scene.cpp
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Line(s) | 228 | #ifndef NDEBUG | |||
---|---|---|---|---|---|
229 | if (data.quads.isTransformed()) { | 229 | if (data.quads.isTransformed()) { | ||
230 | qFatal("Pre-paint calls are not allowed to transform quads!"); | 230 | qFatal("Pre-paint calls are not allowed to transform quads!"); | ||
231 | } | 231 | } | ||
232 | #endif | 232 | #endif | ||
233 | if (!w->isPaintingEnabled()) { | 233 | if (!w->isPaintingEnabled()) { | ||
234 | continue; | 234 | continue; | ||
235 | } | 235 | } | ||
236 | phase2.append(Phase2Data(w, infiniteRegion(), data.clip, data.mask, data.quads)); | 236 | phase2.append(Phase2Data(w, infiniteRegion(), data.clip, data.mask, data.quads)); | ||
237 | // transformations require window pixmap | | |||
238 | w->suspendUnredirect(data.mask | | |||
239 | & (PAINT_WINDOW_TRANSLUCENT | PAINT_SCREEN_TRANSFORMED | PAINT_WINDOW_TRANSFORMED)); | | |||
240 | } | 237 | } | ||
241 | 238 | | |||
242 | foreach (const Phase2Data & d, phase2) { | 239 | foreach (const Phase2Data & d, phase2) { | ||
243 | paintWindow(d.window, d.mask, d.region, d.quads); | 240 | paintWindow(d.window, d.mask, d.region, d.quads); | ||
244 | } | 241 | } | ||
245 | 242 | | |||
246 | const QSize &screenSize = screens()->size(); | 243 | const QSize &screenSize = screens()->size(); | ||
247 | damaged_region = QRegion(0, 0, screenSize.width(), screenSize.height()); | 244 | damaged_region = QRegion(0, 0, screenSize.width(), screenSize.height()); | ||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 258 | for (int i = 0; // do prePaintWindow bottom to top | |||
304 | // preparation step | 301 | // preparation step | ||
305 | effects->prePaintWindow(effectWindow(w), data, time_diff); | 302 | effects->prePaintWindow(effectWindow(w), data, time_diff); | ||
306 | #ifndef NDEBUG | 303 | #ifndef NDEBUG | ||
307 | if (data.quads.isTransformed()) { | 304 | if (data.quads.isTransformed()) { | ||
308 | qFatal("Pre-paint calls are not allowed to transform quads!"); | 305 | qFatal("Pre-paint calls are not allowed to transform quads!"); | ||
309 | } | 306 | } | ||
310 | #endif | 307 | #endif | ||
311 | if (!w->isPaintingEnabled()) { | 308 | if (!w->isPaintingEnabled()) { | ||
312 | w->suspendUnredirect(true); | | |||
313 | continue; | 309 | continue; | ||
314 | } | 310 | } | ||
315 | dirtyArea |= data.paint; | 311 | dirtyArea |= data.paint; | ||
316 | // Schedule the window for painting | 312 | // Schedule the window for painting | ||
317 | phase2data.append(QPair< Window*, Phase2Data >(w,Phase2Data(w, data.paint, data.clip, | 313 | phase2data.append(QPair< Window*, Phase2Data >(w,Phase2Data(w, data.paint, data.clip, | ||
318 | data.mask, data.quads))); | 314 | data.mask, data.quads))); | ||
319 | // no transformations, but translucency requires window pixmap | | |||
320 | w->suspendUnredirect(data.mask & PAINT_WINDOW_TRANSLUCENT); | | |||
321 | } | 315 | } | ||
322 | 316 | | |||
323 | // Save the part of the repaint region that's exclusively rendered to | 317 | // Save the part of the repaint region that's exclusively rendered to | ||
324 | // bring a reused back buffer up to date. Then union the dirty region | 318 | // bring a reused back buffer up to date. Then union the dirty region | ||
325 | // with the repaint region. | 319 | // with the repaint region. | ||
326 | const QRegion repaintClip = repaint_region - dirtyArea; | 320 | const QRegion repaintClip = repaint_region - dirtyArea; | ||
327 | dirtyArea |= repaint_region; | 321 | dirtyArea |= repaint_region; | ||
328 | 322 | | |||
▲ Show 20 Lines • Show All 771 Lines • Show Last 20 Lines |