[Spice-devel] [PATCH 6/8] worker: Do not check surface twice
Jonathon Jongsma
jjongsma at redhat.com
Thu Sep 22 08:00:07 UTC 2016
Looks fine, but we could retain the warning with additional
explanation. For example (proposed):
diff --git a/server/red-worker.c b/server/red-worker.c
index 62e5d86..46f562f 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -662,8 +662,10 @@ static void destroy_primary_surface(RedWorker
*worker, uint32_t surface_id)
{
DisplayChannel *display = worker->display_channel;
- if (!display_channel_validate_surface(display, surface_id))
+ if (!display_channel_validate_surface(display, surface_id)) {
+ spice_warning("double destroy of primary surface");
return;
+ }
spice_warn_if_fail(surface_id == 0);
spice_debug(NULL);
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Mon, 2016-09-19 at 09:30 +0100, Frediano Ziglio wrote:
> validate_surface already do the same checks.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/red-worker.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/server/red-worker.c b/server/red-worker.c
> index 590412b..e39bd84 100644
> --- a/server/red-worker.c
> +++ b/server/red-worker.c
> @@ -693,12 +693,6 @@ static void destroy_primary_surface(RedWorker
> *worker, uint32_t surface_id)
> return;
> spice_warn_if_fail(surface_id == 0);
>
> - spice_debug(NULL);
> - if (!display->surfaces[surface_id].context.canvas) {
> - spice_warning("double destroy of primary surface");
> - return;
> - }
> -
> flush_all_qxl_commands(worker);
> display_channel_destroy_surface_wait(display, 0);
> display_channel_surface_unref(display, 0);
More information about the Spice-devel
mailing list