|
Krita Source Code Documentation
|
The StopAndResumeConsumer struct is used to encapsulate optional stop-and-then-resume behavior of a consumer. Using RAII, we can stop a consumer at construction and simply resume it when it exits scope. More...
Public Member Functions | |
| StopAndResume (KisPlaybackEngineMLT::Private *p_d, bool requireFullRestart=false) | |
| ~StopAndResume () | |
Private Attributes | |
| Private * | m_d |
The StopAndResumeConsumer struct is used to encapsulate optional stop-and-then-resume behavior of a consumer. Using RAII, we can stop a consumer at construction and simply resume it when it exits scope.
Definition at line 289 of file KisPlaybackEngineMLT.cpp.
|
inlineexplicit |
Definition at line 291 of file KisPlaybackEngineMLT.cpp.
References KisPlaybackEngineMLT::Private::cleanupConsumers(), KisPlaybackEngineMLT::Private::frameWaitingInterface, KIS_ASSERT, m_d, KisPlaybackEngineMLT::Private::pullConsumer, KisPlaybackEngineMLT::Private::pushConsumer, KisPlaybackEngineMLT::FrameWaitingInterface::renderingAllowed, KisPlaybackEngineMLT::FrameWaitingInterface::renderingControlMutex, and KisPlaybackEngineMLT::FrameWaitingInterface::renderingWaitCondition.
|
inline |
Make sure that all producer properties are initialized before the consumers start pulling stuff from the producer. Otherwise we can get a race condition with the consumer's read-ahead thread.
Definition at line 314 of file KisPlaybackEngineMLT.cpp.
References KisPlaybackEngineMLT::Private::activeCanvas(), KisPlaybackEngineMLT::Private::activePlaybackMode(), KisImageAnimationInterface::activePlaybackRange(), KisPlaybackEngineMLT::Private::activeProducer(), KisImage::animationInterface(), KisCanvas2::animationState(), KisCanvasAnimationState::currentVolume(), KisPlaybackEngineMLT::Private::dropFrames(), KisTimeSpan::end(), KisPlaybackEngineMLT::Private::frameStats, KisPlaybackEngineMLT::Private::frameWaitingInterface, KisCanvas2::image(), KisPlaybackEngineMLT::Private::initializeConsumers(), KIS_ASSERT, KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisPlaybackEngineMLT::Private::mute, PLAYBACK_PUSH, KisPlaybackEngineMLT::Private::playbackSpeed, KisPlaybackEngineMLT::Private::pullConsumer, KisPlaybackEngineMLT::Private::pushConsumer, KisPlaybackEngineMLT::FrameWaitingInterface::renderingAllowed, KisPlaybackEngineMLT::FrameWaitingInterface::renderingControlMutex, KisPlaybackEngineMLT::FrameWaitingInterface::renderingWaitCondition, KisTimeSpan::start(), and KisPlaybackEngineMLT::FrameWaitingInterface::waitingForFrame.
|
private |
Definition at line 362 of file KisPlaybackEngineMLT.cpp.