KWin
|
Helper class to queue the loading of Effects. More...
#include <effectloader.h>
Public Member Functions | |
AbstractEffectLoadQueue (QObject *parent=nullptr) | |
Protected Slots | |
virtual void | dequeue ()=0 |
Friends | |
template<typename Loader , typename QueueType > | |
class | EffectLoadQueue |
Helper class to queue the loading of Effects.
Loading an Effect has to be done in the compositor thread and thus the Compositor is blocked while the Effect loads. To not block the compositor for several frames the loading of all Effects need to be queued. By invoking the slot dequeue() through a QueuedConnection the queue can ensure that events are processed between the loading of two Effects and thus the compositor doesn't block.
As it needs to be a slot, the queue must subclass QObject, but it also needs to be templated as the information to load an Effect is specific to the Effect Loader. Thus there is the AbstractEffectLoadQueue providing the slots as pure virtual functions and the templated EffectLoadQueue inheriting from AbstractEffectLoadQueue.
The queue operates like a normal queue providing enqueue and a scheduleDequeue instead of dequeue.
Definition at line 208 of file effectloader.h.
|
inlineexplicit |
Definition at line 212 of file effectloader.h.
|
protectedpure virtualslot |
|
friend |
Definition at line 221 of file effectloader.h.