The title is pretty self-explanatory: this change brings support of
displaying HDR content in the sequencer preview. Before this change
it was clamped to the 0..1 range, now it is unclamped sRGB, similar
to how image editor, viewport, and nodes backdrop works.
The general idea is to draw the sequencer content on a non-overlay
frame-buffer and tag viewport as having non-standard input color
space as the sequencer operates in a different space.
The way it is done mimics what happens from the draw manager side
for the nodes backdrop, but bypassing the image engine. Partially
because the image engine expects the Image data-block to be displayed,
but also because of performance: there are a lot of things going on
like float buffer creation, clamping etc. Overall the image engine is
not fast enough for the sequencer needs.
Code-side changes that worth mentioning to highlight the overall
direction for the possible future refactors in the area:
- Decouple arguments from the scene: editing, render data, color
management etc are now passed as individual arguments.
This is an anticipation of story tools project where this data
might be coming from a different place.
- Move the entire preview region drawing to sequencer_preview_draw.cc
Previously logic was split across sequencer_preview_draw.cc and
space_sequencer.cc which was quite tricky to know what should go
where.
- Split functions which had boolean argument to define their behavior
into individual functions.
Generally if a function has boolean argument used in a way
if(foo) { do_something_(); } else { do_something_else() }
it is a good indication that the function is to be split.
Pull Request: https://projects.blender.org/blender/blender/pulls/138094