Even though thumbnails should be used as approximate depiction of strip
content, it is useful to see change in (close to) real time.
This feature required some changes in how thumbnails are drawn:
- Drawing starts from strip left handle position
- First thumbnail actually represents first frame of strip
When moving handle, only first image is updated. Other thumbnails are
read from memory.
Overview of how first thumbnail update is managed:
Similar to how set of guaranteed frames work, a lookup cache for frames
is used. In this case array is used and lookup is supposed to be linear
instead of best fit. Each time a job is created, current frame number is
pushed into array. This cache is used, because job renders image at
handle position asynchronously and therefore will likely lag a bit.
With linear lookup, access to most recent frame is guaranteed, so there
is no risk of noise if many frames are rendered in close space and
handle movement changes direction. This cache currently has 10 frame
slots. Number of slots is technically arbitrary and only few should be
needed as only 1 job can run at the time. Images are stored in global
sequencer cache, so more slots can cover case if image is freed even
though it is unlikely event.
Set of guaranteed frames now covers all of strip media source content.
This probably wasn't necessary change, but behavior is bit more suitable
for editing, not only for navigating.
Other minor changes are fixes for incorrect conditions to check if
thumbnail rendering is needed that were discovered in process.
ref T91618