|
Krita Source Code Documentation
|
#include <KisAsyncAnimationCacheRenderer.h>
Inheritance diagram for KisAsyncAnimationCacheRenderer:Classes | |
| struct | Private |
Signals | |
| void | sigCompleteRegenerationInternal (int frame) |
Signals inherited from KisAsyncAnimationRendererBase | |
| void | sigFrameCancelled (int frame, KisAsyncAnimationRendererBase::CancelReason cancelReason) |
| void | sigFrameCompleted (int frame) |
Public Member Functions | |
| KisAsyncAnimationCacheRenderer () | |
| void | setFrameCache (KisAnimationFrameCacheSP cache) |
| ~KisAsyncAnimationCacheRenderer () | |
Public Member Functions inherited from KisAsyncAnimationRendererBase | |
| bool | isActive () const |
| KisAsyncAnimationRendererBase (QObject *parent=0) | |
| void | startFrameRegeneration (KisImageSP image, int frame, const KisRegion ®ionOfInterest, Flags flags, KisLockFrameGenerationLock &&frameGenerationLock) |
| void | startFrameRegeneration (KisImageSP image, int frame, Flags flags, KisLockFrameGenerationLock &&frameGenerationLock) |
| virtual | ~KisAsyncAnimationRendererBase () |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Protected Member Functions | |
| void | clearFrameRegenerationState (bool isCancelled) override |
| void | frameCancelledCallback (int frame, CancelReason cancelReason) override |
| frameCancelledCallback is called when the rendering of the frame was cancelled. | |
| void | frameCompletedCallback (int frame, const KisRegion &requestedRegion) override |
| frameCompletedCallback is called by the renderer when a new frame becomes ready | |
Protected Member Functions inherited from KisAsyncAnimationRendererBase | |
| KisImageSP | requestedImage () const |
Private Slots | |
| void | slotCompleteRegenerationInternal (int frame) |
Private Attributes | |
| const QScopedPointer< Private > | m_d |
Additional Inherited Members | |
Public Types inherited from KisAsyncAnimationRendererBase | |
| enum | CancelReason { UserCancelled = 0 , RenderingFailed , RenderingTimedOut } |
| enum | Flag { None = 0x0 , Cancellable = 0x1 } |
Public Slots inherited from KisAsyncAnimationRendererBase | |
| void | cancelCurrentFrameRendering (CancelReason cancelReason) |
| cancels current rendering operation | |
Public Attributes inherited from KisAsyncAnimationRendererBase | |
| KisSignalAutoConnectionsStore | imageRequestConnections |
| bool | isCancelled = false |
| QTimer | regenerationTimeout |
| int | requestedFrame = -1 |
| KisImageSP | requestedImage |
| KisRegion | requestedRegion |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Protected Slots inherited from KisAsyncAnimationRendererBase | |
| void | notifyFrameCancelled (int frame, KisAsyncAnimationRendererBase::CancelReason cancelReason) |
| void | notifyFrameCompleted (int frame) |
Definition at line 12 of file KisAsyncAnimationCacheRenderer.h.
| KisAsyncAnimationCacheRenderer::KisAsyncAnimationCacheRenderer | ( | ) |
Definition at line 19 of file KisAsyncAnimationCacheRenderer.cpp.
References connect(), sigCompleteRegenerationInternal(), and slotCompleteRegenerationInternal().
| KisAsyncAnimationCacheRenderer::~KisAsyncAnimationCacheRenderer | ( | ) |
Definition at line 25 of file KisAsyncAnimationCacheRenderer.cpp.
|
overrideprotectedvirtual |
Called by KisAsyncAnimationRendererBase when the processing has been completed and the internal state of the populator should be cleared
| isCancelled | tells if frame regeneration has failed to be regenerated |
Reimplemented from KisAsyncAnimationRendererBase.
Definition at line 69 of file KisAsyncAnimationCacheRenderer.cpp.
References KisAsyncAnimationRendererBase::clearFrameRegenerationState(), KisAsyncAnimationRendererBase::isCancelled, and m_d.
|
overrideprotectedvirtual |
frameCancelledCallback is called when the rendering of the frame was cancelled.
The rendering of the frame can be either cancelled by the image itself or by receiving a timeout signal (10 seconds).
NOTE: the slot is called in the GUI thread. Don't forget to call notifyFrameCancelled() in he end of your call.
Implements KisAsyncAnimationRendererBase.
Definition at line 64 of file KisAsyncAnimationCacheRenderer.cpp.
References KisAsyncAnimationRendererBase::notifyFrameCancelled().
|
overrideprotectedvirtual |
frameCompletedCallback is called by the renderer when a new frame becomes ready
NOTE1: the callback is called from the context of a image worker thread! So it is asynchronous from the GUI thread. NOTE2: in case of successful processing of the frame, the callback must issue some signal, connected to notifyFrameCompleted() via auto connection, to continue processing. Please do not call the method directly, because notifyFame*() slots should be called from the context of the GUI thread. NOTE3: In case of failure, notifyFrameCancelled(). The same threading rules apply.
Implements KisAsyncAnimationRendererBase.
Definition at line 34 of file KisAsyncAnimationCacheRenderer.cpp.
References KisAnimationFrameCache::fetchFrameData(), m_d, KisAsyncAnimationRendererBase::requestedImage, KisAsyncAnimationRendererBase::requestedRegion, and sigCompleteRegenerationInternal().
| void KisAsyncAnimationCacheRenderer::setFrameCache | ( | KisAnimationFrameCacheSP | cache | ) |
Definition at line 29 of file KisAsyncAnimationCacheRenderer.cpp.
References m_d.
|
signal |
|
privateslot |
Definition at line 44 of file KisAsyncAnimationCacheRenderer.cpp.
References KisAnimationFrameCache::addConvertedFrameData(), frameCancelledCallback(), KisAsyncAnimationRendererBase::isActive(), KIS_SAFE_ASSERT_RECOVER, m_d, KisAsyncAnimationRendererBase::notifyFrameCompleted(), KisAsyncAnimationRendererBase::RenderingFailed, and KisAsyncAnimationRendererBase::UserCancelled.
|
private |
Definition at line 35 of file KisAsyncAnimationCacheRenderer.h.