Changeset View
Changeset View
Standalone View
Standalone View
scene.h
Show First 20 Lines • Show All 220 Lines • ▼ Show 20 Line(s) | 210 | protected: | |||
---|---|---|---|---|---|
221 | void finalPaintScreen(int mask, const QRegion ®ion, ScreenPaintData& data); | 221 | void finalPaintScreen(int mask, const QRegion ®ion, ScreenPaintData& data); | ||
222 | // shared implementation of painting the screen in the generic | 222 | // shared implementation of painting the screen in the generic | ||
223 | // (unoptimized) way | 223 | // (unoptimized) way | ||
224 | virtual void paintGenericScreen(int mask, const ScreenPaintData &data); | 224 | virtual void paintGenericScreen(int mask, const ScreenPaintData &data); | ||
225 | // shared implementation of painting the screen in an optimized way | 225 | // shared implementation of painting the screen in an optimized way | ||
226 | virtual void paintSimpleScreen(int mask, const QRegion ®ion); | 226 | virtual void paintSimpleScreen(int mask, const QRegion ®ion); | ||
227 | // paint the background (not the desktop background - the whole background) | 227 | // paint the background (not the desktop background - the whole background) | ||
228 | virtual void paintBackground(const QRegion ®ion) = 0; | 228 | virtual void paintBackground(const QRegion ®ion) = 0; | ||
229 | | ||||
230 | /** | ||||
231 | * Notifies about starting to paint. | ||||
232 | * | ||||
233 | * @p damage contains the reported damage as suggested by windows and effects on prepaint calls. | ||||
234 | */ | ||||
235 | virtual void aboutToStartPainting(const QRegion &damage); | ||||
229 | // called after all effects had their paintWindow() called | 236 | // called after all effects had their paintWindow() called | ||
230 | void finalPaintWindow(EffectWindowImpl* w, int mask, const QRegion ®ion, WindowPaintData& data); | 237 | void finalPaintWindow(EffectWindowImpl* w, int mask, const QRegion ®ion, WindowPaintData& data); | ||
231 | // shared implementation, starts painting the window | 238 | // shared implementation, starts painting the window | ||
232 | virtual void paintWindow(Window* w, int mask, const QRegion ®ion, const WindowQuadList &quads); | 239 | virtual void paintWindow(Window* w, int mask, const QRegion ®ion, const WindowQuadList &quads); | ||
233 | // called after all effects had their drawWindow() called | 240 | // called after all effects had their drawWindow() called | ||
234 | virtual void finalDrawWindow(EffectWindowImpl* w, int mask, const QRegion ®ion, WindowPaintData& data); | 241 | virtual void finalDrawWindow(EffectWindowImpl* w, int mask, const QRegion ®ion, WindowPaintData& data); | ||
235 | // let the scene decide whether it's better to paint more of the screen, eg. in order to allow a buffer swap | 242 | // let the scene decide whether it's better to paint more of the screen, eg. in order to allow a buffer swap | ||
236 | // the default is NOOP | 243 | // the default is NOOP | ||
Show All 26 Lines | |||||
263 | int time_diff; | 270 | int time_diff; | ||
264 | QElapsedTimer last_time; | 271 | QElapsedTimer last_time; | ||
265 | private: | 272 | private: | ||
266 | void paintWindowThumbnails(Scene::Window *w, const QRegion ®ion, qreal opacity, qreal brightness, qreal saturation); | 273 | void paintWindowThumbnails(Scene::Window *w, const QRegion ®ion, qreal opacity, qreal brightness, qreal saturation); | ||
267 | void paintDesktopThumbnails(Scene::Window *w); | 274 | void paintDesktopThumbnails(Scene::Window *w); | ||
268 | QHash< Toplevel*, Window* > m_windows; | 275 | QHash< Toplevel*, Window* > m_windows; | ||
269 | // windows in their stacking order | 276 | // windows in their stacking order | ||
270 | QVector< Window* > stacking_order; | 277 | QVector< Window* > stacking_order; | ||
278 | // how many times finalPaintScreen() has been called | ||||
279 | int m_paintScreenCount = 0; | ||||
271 | }; | 280 | }; | ||
272 | 281 | | |||
273 | /** | 282 | /** | ||
274 | * Factory class to create a Scene. Needs to be implemented by the plugins. | 283 | * Factory class to create a Scene. Needs to be implemented by the plugins. | ||
275 | */ | 284 | */ | ||
276 | class KWIN_EXPORT SceneFactory : public QObject | 285 | class KWIN_EXPORT SceneFactory : public QObject | ||
277 | { | 286 | { | ||
278 | Q_OBJECT | 287 | Q_OBJECT | ||
▲ Show 20 Lines • Show All 423 Lines • Show Last 20 Lines |