Changeset View
Changeset View
Standalone View
Standalone View
scene.h
Show First 20 Lines • Show All 222 Lines • ▼ Show 20 Line(s) | 198 | protected: | |||
---|---|---|---|---|---|
223 | // let the scene decide whether it's better to paint more of the screen, eg. in order to allow a buffer swap | 223 | // let the scene decide whether it's better to paint more of the screen, eg. in order to allow a buffer swap | ||
224 | // the default is NOOP | 224 | // the default is NOOP | ||
225 | virtual void extendPaintRegion(QRegion ®ion, bool opaqueFullscreen); | 225 | virtual void extendPaintRegion(QRegion ®ion, bool opaqueFullscreen); | ||
226 | virtual void paintDesktop(int desktop, int mask, const QRegion ®ion, ScreenPaintData &data); | 226 | virtual void paintDesktop(int desktop, int mask, const QRegion ®ion, ScreenPaintData &data); | ||
227 | // compute time since the last repaint | 227 | // compute time since the last repaint | ||
228 | void updateTimeDiff(); | 228 | void updateTimeDiff(); | ||
229 | // saved data for 2nd pass of optimized screen painting | 229 | // saved data for 2nd pass of optimized screen painting | ||
230 | struct Phase2Data { | 230 | struct Phase2Data { | ||
231 | Phase2Data(Window* w, QRegion r, QRegion c, int m, const WindowQuadList& q) | 231 | Window *window = nullptr; | ||
232 | : window(w), region(r), clip(c), mask(m), quads(q) {} | | |||
233 | Phase2Data() { | | |||
234 | window = 0; | | |||
235 | mask = 0; | | |||
236 | } | | |||
237 | Window* window; | | |||
238 | QRegion region; | 232 | QRegion region; | ||
239 | QRegion clip; | 233 | QRegion clip; | ||
240 | int mask; | 234 | int mask = 0; | ||
241 | WindowQuadList quads; | 235 | WindowQuadList quads; | ||
242 | }; | 236 | }; | ||
243 | // The region which actually has been painted by paintScreen() and should be | 237 | // The region which actually has been painted by paintScreen() and should be | ||
244 | // copied from the buffer to the screen. I.e. the region returned from Scene::paintScreen(). | 238 | // copied from the buffer to the screen. I.e. the region returned from Scene::paintScreen(). | ||
245 | // Since prePaintWindow() can extend areas to paint, these changes would have to propagate | 239 | // Since prePaintWindow() can extend areas to paint, these changes would have to propagate | ||
246 | // up all the way from paintSimpleScreen() up to paintScreen(), so save them here rather | 240 | // up all the way from paintSimpleScreen() up to paintScreen(), so save them here rather | ||
247 | // than propagate them up in arguments. | 241 | // than propagate them up in arguments. | ||
248 | QRegion painted_region; | 242 | QRegion painted_region; | ||
▲ Show 20 Lines • Show All 435 Lines • Show Last 20 Lines |