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
10981098 mp_mutex_unlock(&in->lock);
10991099
11001100 vo->driver->draw_frame(vo, frame);
1101− vo->driver->control(vo, VOCTRL_REDRAW, NULL);
11021101 vo->driver->flip_page(vo);
11031102
11041103 if (frame != &dummy && !vo->driver->frame_owner)
@@ -1180,6 +1179,7 @@ static MP_THREAD_VOID vo_thread(void *ptr) · 75 unmodified lines
11801179 if (send_pause)
11811180 vo->driver->control(vo, vo_paused ? VOCTRL_PAUSE : VOCTRL_RESUME, NULL);
11821181 if (wait_until > now && redraw) {
1182+ vo->driver->control(vo, VOCTRL_REDRAW, NULL);
11831183 do_redraw(vo); // now is a good time
11841184 continue;
11851185 }

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