Fixed missing display buffer invalidation when rendering sequencer animation
This commit is contained in:
@@ -2585,7 +2585,9 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
|
|||||||
|
|
||||||
/* invalidate color managed buffers if render result changed */
|
/* invalidate color managed buffers if render result changed */
|
||||||
BLI_lock_thread(LOCK_COLORMANAGE);
|
BLI_lock_thread(LOCK_COLORMANAGE);
|
||||||
if (ibuf->x != rres.rectx || ibuf->y != rres.recty || ibuf->rect_float != rectf) {
|
if (ibuf->x != rres.rectx || ibuf->y != rres.recty ||
|
||||||
|
ibuf->rect_float != rectf || ibuf->rect != rect)
|
||||||
|
{
|
||||||
ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID;
|
ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -124,8 +124,14 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
|
|||||||
if (rr->rectf)
|
if (rr->rectf)
|
||||||
rectf = rr->rectf;
|
rectf = rr->rectf;
|
||||||
else {
|
else {
|
||||||
if (rr->rect32)
|
if (rr->rect32) {
|
||||||
|
/* special case, currently only happens with sequencer rendering,
|
||||||
|
* which updates the whole frame, so we can only mark display buffer
|
||||||
|
* as invalid here (sergey)
|
||||||
|
*/
|
||||||
|
ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (rr->renlay == NULL || rr->renlay->rectf == NULL) return;
|
if (rr->renlay == NULL || rr->renlay->rectf == NULL) return;
|
||||||
rectf = rr->renlay->rectf;
|
rectf = rr->renlay->rectf;
|
||||||
|
@@ -1718,6 +1718,9 @@ static void do_render_seq(Render *re)
|
|||||||
re->progress(re->prh, (float)(cfra - re->r.sfra) / (re->r.efra - re->r.sfra));
|
re->progress(re->prh, (float)(cfra - re->r.sfra) / (re->r.efra - re->r.sfra));
|
||||||
else
|
else
|
||||||
re->progress(re->prh, 1.0f);
|
re->progress(re->prh, 1.0f);
|
||||||
|
|
||||||
|
/* would mark display buffers as invalid */
|
||||||
|
re->display_draw(re->ddh, re->result, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||||
|
Reference in New Issue
Block a user