|
Krita Source Code Documentation
|
The KisFrameDisplayProxy class sits between the KisCanvas (within its KisCanvasAnimationState) and its associated KisImage. Its mainly responsible for choosing whether to reproject the image (always accurate) OR reuse the canvas' KisAnimationFrameCache (usually fast). :) More...
#include <KisFrameDisplayProxy.h>
Inheritance diagram for KisFrameDisplayProxy:Signals | |
| void | sigFrameChange () |
| void | sigFrameDisplayRefreshed () |
| void | sigFrameRefreshSkipped () |
| sigFrameRefreshSkipped tracks whether asynchronous "slow" refreshes are skipped due to the frame being the same. In the case of waiting for next frame to render, it is necessary to let any binding classes know that the there was no need to refresh the display at all. | |
Public Member Functions | |
| int | activeFrame () const |
| Gets the active frame, the frame that is intended to be shown. This should always reflect the actual time position of the canvas at any given point. In certain circumstances this value can be different from what is currently being shown. (For example, when showing the activeKeyframe instead.) | |
| bool | displayFrame (int frame, bool forceReproject) |
| Tell the DisplayProxy to show a new frame. | |
| KisFrameDisplayProxy (class KisCanvas2 *canvas, QObject *parent=nullptr) | |
| ~KisFrameDisplayProxy () | |
Private Member Functions | |
| int | activeKeyframe () const |
| Get the active keyframe. This is the latest unique frame that is actually visible. It is not always the same as the position of playback, since it only changes when there's new content to be shown. (Consider "held" frames.) | |
| bool | needsReprojection (KisAnimationFrameCacheSP cache, int from, int to) |
| bool | shouldUploadFrame (KisAnimationFrameCacheSP cache, int from, int to) |
Private Attributes | |
| QScopedPointer< struct Private > | m_d |
The KisFrameDisplayProxy class sits between the KisCanvas (within its KisCanvasAnimationState) and its associated KisImage. Its mainly responsible for choosing whether to reproject the image (always accurate) OR reuse the canvas' KisAnimationFrameCache (usually fast). :)
Definition at line 21 of file KisFrameDisplayProxy.h.
| KisFrameDisplayProxy::KisFrameDisplayProxy | ( | class KisCanvas2 * | canvas, |
| QObject * | parent = nullptr ) |
Definition at line 25 of file KisFrameDisplayProxy.cpp.
References connect(), KIS_ASSERT, m_d, and KisImageAnimationInterface::sigFrameRegenerated().
| KisFrameDisplayProxy::~KisFrameDisplayProxy | ( | ) |
Definition at line 67 of file KisFrameDisplayProxy.cpp.
| int KisFrameDisplayProxy::activeFrame | ( | ) | const |
Gets the active frame, the frame that is intended to be shown. This should always reflect the actual time position of the canvas at any given point. In certain circumstances this value can be different from what is currently being shown. (For example, when showing the activeKeyframe instead.)
Definition at line 108 of file KisFrameDisplayProxy.cpp.
References m_d.
|
private |
Get the active keyframe. This is the latest unique frame that is actually visible. It is not always the same as the position of playback, since it only changes when there's new content to be shown. (Consider "held" frames.)
Definition at line 113 of file KisFrameDisplayProxy.cpp.
References m_d.
| bool KisFrameDisplayProxy::displayFrame | ( | int | frame, |
| bool | forceReproject ) |
Tell the DisplayProxy to show a new frame.
| forceReproject | demands that the image used instead of the canvas' animation cache. |
Definition at line 71 of file KisFrameDisplayProxy.cpp.
References KisImage::animationInterface(), KisImageAnimationInterface::currentUITime(), KisImageAnimationInterface::hasAnimation(), KisImageAnimationInterface::image(), m_d, needsReprojection(), shouldUploadFrame(), sigFrameChange(), sigFrameDisplayRefreshed(), KisImageAnimationInterface::STAO_FORCE_REGENERATION, KisImageAnimationInterface::switchCurrentTimeAsync(), and KisAnimationFrameCache::uploadFrame().
|
private |
Definition at line 123 of file KisFrameDisplayProxy.cpp.
References KisAnimationFrameCache::frameStatus().
|
private |
Definition at line 118 of file KisFrameDisplayProxy.cpp.
References KisAnimationFrameCache::shouldUploadNewFrame().
|
signal |
|
signal |
|
signal |
sigFrameRefreshSkipped tracks whether asynchronous "slow" refreshes are skipped due to the frame being the same. In the case of waiting for next frame to render, it is necessary to let any binding classes know that the there was no need to refresh the display at all.
|
private |
Definition at line 63 of file KisFrameDisplayProxy.h.