Changeset View
Changeset View
Standalone View
Standalone View
plugins/scenes/opengl/lanczosfilter.cpp
Show First 20 Lines • Show All 388 Lines • ▼ Show 20 Line(s) | |||||
389 | { | 389 | { | ||
390 | if (event->timerId() == m_timer.timerId()) { | 390 | if (event->timerId() == m_timer.timerId()) { | ||
391 | m_timer.stop(); | 391 | m_timer.stop(); | ||
392 | 392 | | |||
393 | delete m_offscreenTarget; | 393 | delete m_offscreenTarget; | ||
394 | delete m_offscreenTex; | 394 | delete m_offscreenTex; | ||
395 | m_offscreenTarget = nullptr; | 395 | m_offscreenTarget = nullptr; | ||
396 | m_offscreenTex = nullptr; | 396 | m_offscreenTex = nullptr; | ||
397 | foreach (X11Client *c, Workspace::self()->clientList()) { | 397 | | ||
398 | discardCacheTexture(c->effectWindow()); | 398 | workspace()->forEachToplevel([this](Toplevel *toplevel) { | ||
399 | } | 399 | discardCacheTexture(toplevel->effectWindow()); | ||
400 | foreach (X11Client *c, Workspace::self()->desktopList()) { | 400 | }); | ||
401 | discardCacheTexture(c->effectWindow()); | | |||
402 | } | | |||
403 | foreach (Unmanaged *u, Workspace::self()->unmanagedList()) { | | |||
404 | discardCacheTexture(u->effectWindow()); | | |||
405 | } | | |||
406 | foreach (Deleted *d, Workspace::self()->deletedList()) { | | |||
407 | discardCacheTexture(d->effectWindow()); | | |||
408 | } | | |||
409 | } | 401 | } | ||
410 | } | 402 | } | ||
411 | 403 | | |||
412 | void LanczosFilter::discardCacheTexture(EffectWindow *w) | 404 | void LanczosFilter::discardCacheTexture(EffectWindow *w) | ||
413 | { | 405 | { | ||
414 | QVariant cachedTextureVariant = w->data(LanczosCacheRole); | 406 | QVariant cachedTextureVariant = w->data(LanczosCacheRole); | ||
415 | if (cachedTextureVariant.isValid()) { | 407 | if (cachedTextureVariant.isValid()) { | ||
416 | delete static_cast< GLTexture*>(cachedTextureVariant.value<void*>()); | 408 | delete static_cast< GLTexture*>(cachedTextureVariant.value<void*>()); | ||
Show All 12 Lines |