Cleanup: Remove unused runtime field from the MovieClip

It is a part of old-standing TODO, and code which accesses
the value was commented out for many years.

Remove the field to help with an upcoming const-correctness
improvements.
This commit is contained in:
Sergey Sharybin 2023-01-05 12:21:04 +01:00
parent 963600ddc0
commit 58b6c91d36
2 changed files with 2 additions and 14 deletions

View File

@ -1344,7 +1344,6 @@ static ImBuf *movieclip_get_postprocessed_ibuf(
}
if (ibuf) {
clip->lastframe = framenr;
real_ibuf_size(clip, user, ibuf, &clip->lastsize[0], &clip->lastsize[1]);
/* Post-process frame and put to cache if needed. */
@ -1566,17 +1565,7 @@ bool BKE_movieclip_has_frame(MovieClip *clip, MovieClipUser *user)
void BKE_movieclip_get_size(MovieClip *clip, MovieClipUser *user, int *width, int *height)
{
#if 0
/* originally was needed to support image sequences with different image dimensions,
* which might be useful for such things as reconstruction of unordered image sequence,
* or painting/rotoscoping of non-equal-sized images, but this ended up in unneeded
* cache lookups and even unwanted non-proxied files loading when doing mask parenting,
* so let's disable this for now and assume image sequence consists of images with
* equal sizes (sergey)
* TODO(sergey): Support reading sequences of different resolution.
*/
if (user->framenr == clip->lastframe) {
#endif
/* TODO(sergey): Support reading sequences of different resolution. */
if (clip->lastsize[0] != 0 && clip->lastsize[1] != 0) {
*width = clip->lastsize[0];
*height = clip->lastsize[1];

View File

@ -65,8 +65,7 @@ typedef struct MovieClip {
/** Sequence or movie. */
int source;
/** Last accessed frame number. */
int lastframe;
int _pad;
/** Size of last accessed frame. */
int lastsize[2];