On Thu, Feb 14, 2019 at 10:28:11AM +0000, Peter Maydell wrote: > Currently the switchSurface method takes a DisplaySurface. We want > to change our DisplayChangeListener's dpy_gfx_switch callback > to do this work asynchronously on a different thread. The caller > of the switch callback will free the old DisplaySurface > immediately the callback returns, so to ensure that the > other thread doesn't access freed data we need to switch > to using the underlying pixman image instead. The pixman > image is reference counted, so we will be able to take > a reference to it to avoid it vanishing too early. > > In this commit we only change the switchSurface method > to take a pixman image, and keep the flow of control > synchronous for now. > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > ui/cocoa.m | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) >
Reviewed-by: Roman Bolshakov <r.bolsha...@yadro.com> Tested-by: Roman Bolshakov <r.bolsha...@yadro.com> Thanks, Roman