History

vo: signal VOCTRL_REDRAW in a less sensitive spot

Windows works totally differently than the other backends and is sensitive to synchronization issues since it runs its control on a separate thread. The spot where this was originally placed was a perfect storm of causing resize weirdness because it was before the flip and right after the redraw. Ideally, this is known to the windowing backend before the flip actually happens so just move this out to before the do_redraw call. It makes no practical difference for the one user of this and sidesteps the implementation differences that exist on Windows. Fixes fc9d1ca182125efa4f16bf3ed0fec8357806b3a7.

Dudemanguy committed 1 year ago

Commit 8ed2c981 parent 5459b0f1 file · +1 −1Browse files

Unified · Split

video/out/vo.c+1−1
@@ -1098,7 +1098,6 @@ static void do_redraw(struct vo *vo) · 1097 unmodified lines
1098 mp_mutex_unlock(&in->lock);1098 mp_mutex_unlock(&in->lock);
1099 1099
1100 vo->driver->draw_frame(vo, frame);1100 vo->driver->draw_frame(vo, frame);
1101 vo->driver->control(vo, VOCTRL_REDRAW, NULL);
1102 vo->driver->flip_page(vo);1101 vo->driver->flip_page(vo);
1103 1102
1104 if (frame != &dummy && !vo->driver->frame_owner)1103 if (frame != &dummy && !vo->driver->frame_owner)
@@ -1180,6 +1179,7 @@ static MP_THREAD_VOID vo_thread(void *ptr) · 75 unmodified lines
1180 if (send_pause)1179 if (send_pause)
1181 vo->driver->control(vo, vo_paused ? VOCTRL_PAUSE : VOCTRL_RESUME, NULL);1180 vo->driver->control(vo, vo_paused ? VOCTRL_PAUSE : VOCTRL_RESUME, NULL);
1182 if (wait_until > now && redraw) {1181 if (wait_until > now && redraw) {
1182 vo->driver->control(vo, VOCTRL_REDRAW, NULL);
1183 do_redraw(vo); // now is a good time1183 do_redraw(vo); // now is a good time
1184 continue;1184 continue;
1185 }1185 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t