[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/7] ui/cocoa: Use the pixman image directly
From: |
Roman Bolshakov |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/7] ui/cocoa: Use the pixman image directly in switchSurface |
Date: |
Fri, 22 Feb 2019 20:27:02 +0300 |
User-agent: |
NeoMutt/20180716 |
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 <address@hidden>
> ---
> ui/cocoa.m | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
Reviewed-by: Roman Bolshakov <address@hidden>
Tested-by: Roman Bolshakov <address@hidden>
Thanks,
Roman
[Qemu-devel] [PATCH v2 6/7] ui/cocoa: Subclass NSApplication so we can implement sendEvent, Peter Maydell, 2019/02/14
[Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread, Peter Maydell, 2019/02/14