Changeset View
Changeset View
Standalone View
Standalone View
effects.cpp
Show First 20 Lines • Show All 391 Lines • ▼ Show 20 Line(s) | |||||
392 | { | 392 | { | ||
393 | if (m_currentPaintScreenIterator != m_activeEffects.constEnd()) { | 393 | if (m_currentPaintScreenIterator != m_activeEffects.constEnd()) { | ||
394 | (*m_currentPaintScreenIterator++)->prePaintScreen(data, time); | 394 | (*m_currentPaintScreenIterator++)->prePaintScreen(data, time); | ||
395 | --m_currentPaintScreenIterator; | 395 | --m_currentPaintScreenIterator; | ||
396 | } | 396 | } | ||
397 | // no special final code | 397 | // no special final code | ||
398 | } | 398 | } | ||
399 | 399 | | |||
400 | void EffectsHandlerImpl::paintScreen(int mask, QRegion region, ScreenPaintData& data) | 400 | void EffectsHandlerImpl::paintScreen(int mask, const QRegion ®ion, ScreenPaintData& data) | ||
401 | { | 401 | { | ||
402 | if (m_currentPaintScreenIterator != m_activeEffects.constEnd()) { | 402 | if (m_currentPaintScreenIterator != m_activeEffects.constEnd()) { | ||
403 | (*m_currentPaintScreenIterator++)->paintScreen(mask, region, data); | 403 | (*m_currentPaintScreenIterator++)->paintScreen(mask, region, data); | ||
404 | --m_currentPaintScreenIterator; | 404 | --m_currentPaintScreenIterator; | ||
405 | } else | 405 | } else | ||
406 | m_scene->finalPaintScreen(mask, region, data); | 406 | m_scene->finalPaintScreen(mask, region, data); | ||
407 | } | 407 | } | ||
408 | 408 | | |||
Show All 26 Lines | |||||
435 | { | 435 | { | ||
436 | if (m_currentPaintWindowIterator != m_activeEffects.constEnd()) { | 436 | if (m_currentPaintWindowIterator != m_activeEffects.constEnd()) { | ||
437 | (*m_currentPaintWindowIterator++)->prePaintWindow(w, data, time); | 437 | (*m_currentPaintWindowIterator++)->prePaintWindow(w, data, time); | ||
438 | --m_currentPaintWindowIterator; | 438 | --m_currentPaintWindowIterator; | ||
439 | } | 439 | } | ||
440 | // no special final code | 440 | // no special final code | ||
441 | } | 441 | } | ||
442 | 442 | | |||
443 | void EffectsHandlerImpl::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) | 443 | void EffectsHandlerImpl::paintWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data) | ||
444 | { | 444 | { | ||
445 | if (m_currentPaintWindowIterator != m_activeEffects.constEnd()) { | 445 | if (m_currentPaintWindowIterator != m_activeEffects.constEnd()) { | ||
446 | (*m_currentPaintWindowIterator++)->paintWindow(w, mask, region, data); | 446 | (*m_currentPaintWindowIterator++)->paintWindow(w, mask, region, data); | ||
447 | --m_currentPaintWindowIterator; | 447 | --m_currentPaintWindowIterator; | ||
448 | } else | 448 | } else | ||
449 | m_scene->finalPaintWindow(static_cast<EffectWindowImpl*>(w), mask, region, data); | 449 | m_scene->finalPaintWindow(static_cast<EffectWindowImpl*>(w), mask, region, data); | ||
450 | } | 450 | } | ||
451 | 451 | | |||
452 | void EffectsHandlerImpl::paintEffectFrame(EffectFrame* frame, QRegion region, double opacity, double frameOpacity) | 452 | void EffectsHandlerImpl::paintEffectFrame(EffectFrame* frame, const QRegion ®ion, double opacity, double frameOpacity) | ||
453 | { | 453 | { | ||
454 | if (m_currentPaintEffectFrameIterator != m_activeEffects.constEnd()) { | 454 | if (m_currentPaintEffectFrameIterator != m_activeEffects.constEnd()) { | ||
455 | (*m_currentPaintEffectFrameIterator++)->paintEffectFrame(frame, region, opacity, frameOpacity); | 455 | (*m_currentPaintEffectFrameIterator++)->paintEffectFrame(frame, region, opacity, frameOpacity); | ||
456 | --m_currentPaintEffectFrameIterator; | 456 | --m_currentPaintEffectFrameIterator; | ||
457 | } else { | 457 | } else { | ||
458 | const EffectFrameImpl* frameImpl = static_cast<const EffectFrameImpl*>(frame); | 458 | const EffectFrameImpl* frameImpl = static_cast<const EffectFrameImpl*>(frame); | ||
459 | frameImpl->finalRender(region, opacity, frameOpacity); | 459 | frameImpl->finalRender(region, opacity, frameOpacity); | ||
460 | } | 460 | } | ||
Show All 11 Lines | |||||
472 | Effect *EffectsHandlerImpl::provides(Effect::Feature ef) | 472 | Effect *EffectsHandlerImpl::provides(Effect::Feature ef) | ||
473 | { | 473 | { | ||
474 | for (int i = 0; i < loaded_effects.size(); ++i) | 474 | for (int i = 0; i < loaded_effects.size(); ++i) | ||
475 | if (loaded_effects.at(i).second->provides(ef)) | 475 | if (loaded_effects.at(i).second->provides(ef)) | ||
476 | return loaded_effects.at(i).second; | 476 | return loaded_effects.at(i).second; | ||
477 | return nullptr; | 477 | return nullptr; | ||
478 | } | 478 | } | ||
479 | 479 | | |||
480 | void EffectsHandlerImpl::drawWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) | 480 | void EffectsHandlerImpl::drawWindow(EffectWindow* w, int mask, const QRegion ®ion, WindowPaintData& data) | ||
481 | { | 481 | { | ||
482 | if (m_currentDrawWindowIterator != m_activeEffects.constEnd()) { | 482 | if (m_currentDrawWindowIterator != m_activeEffects.constEnd()) { | ||
483 | (*m_currentDrawWindowIterator++)->drawWindow(w, mask, region, data); | 483 | (*m_currentDrawWindowIterator++)->drawWindow(w, mask, region, data); | ||
484 | --m_currentDrawWindowIterator; | 484 | --m_currentDrawWindowIterator; | ||
485 | } else | 485 | } else | ||
486 | m_scene->finalDrawWindow(static_cast<EffectWindowImpl*>(w), mask, region, data); | 486 | m_scene->finalDrawWindow(static_cast<EffectWindowImpl*>(w), mask, region, data); | ||
487 | } | 487 | } | ||
488 | 488 | | |||
▲ Show 20 Lines • Show All 1786 Lines • ▼ Show 20 Line(s) | 2269 | { | |||
2275 | m_sceneFrame->freeIconFrame(); | 2275 | m_sceneFrame->freeIconFrame(); | ||
2276 | } | 2276 | } | ||
2277 | 2277 | | |||
2278 | void EffectFrameImpl::plasmaThemeChanged() | 2278 | void EffectFrameImpl::plasmaThemeChanged() | ||
2279 | { | 2279 | { | ||
2280 | free(); | 2280 | free(); | ||
2281 | } | 2281 | } | ||
2282 | 2282 | | |||
2283 | void EffectFrameImpl::render(QRegion region, double opacity, double frameOpacity) | 2283 | void EffectFrameImpl::render(const QRegion ®ion, double opacity, double frameOpacity) | ||
2284 | { | 2284 | { | ||
2285 | if (m_geometry.isEmpty()) { | 2285 | if (m_geometry.isEmpty()) { | ||
2286 | return; // Nothing to display | 2286 | return; // Nothing to display | ||
2287 | } | 2287 | } | ||
2288 | m_shader = nullptr; | 2288 | m_shader = nullptr; | ||
2289 | setScreenProjectionMatrix(static_cast<EffectsHandlerImpl*>(effects)->scene()->screenProjectionMatrix()); | 2289 | setScreenProjectionMatrix(static_cast<EffectsHandlerImpl*>(effects)->scene()->screenProjectionMatrix()); | ||
2290 | effects->paintEffectFrame(this, region, opacity, frameOpacity); | 2290 | effects->paintEffectFrame(this, region, opacity, frameOpacity); | ||
2291 | } | 2291 | } | ||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |