On 2019-03-20 1:56 p.m., Michel Dänzer wrote: > On 2019-03-20 4:42 p.m., Liu, Leo wrote: >> The wait here is unnecessary since we got a pool of back buffers, >> and the wait for swap buffer will happen before the present pixmap, >> at the same time the previous back buffer will be put back to pool >> for reuse after the check for PresentIdleNotify event >> >> Signed-off-by: Leo Liu <[email protected]> >> >> [...] >> >> @@ -626,13 +621,6 @@ vl_dri3_screen_texture_from_drawable(struct vl_screen >> *vscreen, void *drawable) >> if (!dri3_set_drawable(scrn, (Drawable)drawable)) >> return NULL; >> >> - if (scrn->flushed) { >> - while (scrn->special_event && scrn->recv_sbc < scrn->send_sbc) >> - if (!dri3_wait_present_events(scrn)) >> - return NULL; >> - } >> - scrn->flushed = false; >> - >> buffer = (scrn->is_pixmap) ? >> dri3_get_front_buffer(scrn) : >> dri3_get_back_buffer(scrn); >> > Hmm. Is the wait here not necessary before getting a pixmap's front > buffer either though? Maybe wait only here for a pixmap, and only in > vl_dri3_flush_frontbuffer for a window? > > Sorry I didn't realize this earlier. > The pixmap case is used by Totem player, or previous GLX case for MPV player, and the front buffer of the pixmap is a temporary buffer, and later as source for GL to present.
For pixmap case, there is no need to wait, and the dri3 present wait before dri3_get_front_buffer() is not get called, because scrn->flushed will never be true, since our presentation flush code is not used by this case. Thanks, Leo _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
