◆ CachesMap
◆ Private()
◆ ~Private()
| KisAnimationFrameCache::Private::~Private |
( |
| ) |
|
|
inline |
◆ addFrame()
◆ effectiveLevelOfDetail()
| int KisAnimationFrameCache::Private::effectiveLevelOfDetail |
( |
const QRect & | rc | ) |
const |
|
inline |
◆ fetchFrameDataImpl()
Definition at line 391 of file kis_animation_frame_cache.cpp.
392{
393 if (lod > 0) {
397
400 } else {
402 }
403}
KisPaintDeviceSP projection() const
KisOpenGLUpdateInfoSP updateCache(const QRect &rect, KisImageSP srcImage)
KisOpenGLUpdateInfoBuilder & updateInfoBuilder()
void generateLodCloneDevice(KisPaintDeviceSP dst, const QRect &originalRect, int lod)
const KoColorSpace * colorSpace() const
void prepareClone(KisPaintDeviceSP src)
KisOpenGLUpdateInfoSP buildUpdateInfo(const QRect &rect, KisImageSP srcImage, bool convertColorSpace)
References KisLodTransformBase::alignedRect(), KisImage::bounds(), KisOpenGLUpdateInfoBuilder::buildUpdateInfo(), KisPaintDevice::colorSpace(), KisPaintDevice::extent(), KisPaintDevice::generateLodCloneDevice(), image, KisPaintDevice::prepareClone(), KisImage::projection(), textures, KisOpenGLImageTextures::updateCache(), and KisOpenGLImageTextures::updateInfoBuilder().
◆ getFrame()
◆ getFrameIdAtTime()
| int KisAnimationFrameCache::Private::getFrameIdAtTime |
( |
int | time | ) |
const |
|
inline |
Definition at line 65 of file kis_animation_frame_cache.cpp.
66 {
68
70
72
74 const int start = it.key();
75 const int length = it.value();
76
77 bool foundFrameValid = false;
78
80 if (start <= time) {
81 foundFrameValid = true;
82 }
83 } else {
84 int end = start +
length - 1;
85 if (start <= time && time <= end) {
86 foundFrameValid = true;
87 }
88 }
89
90 return foundFrameValid ? start : -1;
91 }
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
References KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, length(), and newFrames.
◆ hasFrame()
| bool KisAnimationFrameCache::Private::hasFrame |
( |
int | time | ) |
const |
|
inline |
◆ invalidate()
| bool KisAnimationFrameCache::Private::invalidate |
( |
const KisTimeSpan & | range | ) |
|
|
inline |
Invalidate any cached frames within the given time range.
- Parameters
-
- Returns
- true if frames were invalidated, false if nothing was changed
Definition at line 117 of file kis_animation_frame_cache.cpp.
118 {
120
121 bool cacheChanged = false;
122
125
127 const int start = it.key();
128 const int length = it.value();
129 const bool frameIsInfinite = (
length == -1);
130 const int end = start +
length - 1;
131
132 if (start >= range.
start()) {
134 break;
135 }
136
137 if (!range.
isInfinite() && (frameIsInfinite || end > range.
end())) {
138
139 int newStart = range.
end() + 1;
140 int newLength = frameIsInfinite ? -1 : (end - newStart + 1);
141
143 swapper->moveFrame(start, newStart);
144 } else {
146 }
147
149
150 cacheChanged = true;
151 continue;
152
153 }
else if (frameIsInfinite || end >= range.
start()) {
154 const int newEnd = range.
start() - 1;
155 *it = newEnd - start + 1;
156
157 cacheChanged = true;
158 }
159
160 it++;
161 }
162
163 return cacheChanged;
164 }
References KisTimeSpan::end(), KisTimeSpan::isInfinite(), length(), newFrames, KisTimeSpan::start(), and swapper.
◆ caches
◆ frameSizeLimit
| int KisAnimationFrameCache::Private::frameSizeLimit = 777 |
◆ image
◆ newFrames
| QMap<int, int> KisAnimationFrameCache::Private::newFrames |
◆ swapper
◆ textures
The documentation for this struct was generated from the following file: