Remove now useless check

display_channel_surface_id_unref resets the surface so
display_channel_surface_has_canvas will return false.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
Frediano Ziglio 2021-05-26 20:03:39 +01:00
parent d8bca15f2b
commit 258fda6290
3 changed files with 0 additions and 13 deletions

View File

@ -255,13 +255,6 @@ static void display_channel_surface_unref(DisplayChannel *display, RedSurface *s
delete surface;
}
/* TODO: perhaps rename to "ready" or "realized" ? */
gboolean display_channel_surface_has_canvas(DisplayChannel *display,
uint32_t surface_id)
{
return display->priv->surfaces[surface_id] != nullptr;
}
void display_channel_surface_id_unref(DisplayChannel *display, uint32_t surface_id)
{
display_channel_surface_unref(display, display->priv->surfaces[surface_id]);

View File

@ -140,7 +140,6 @@ void display_channel_set_monitors_config_to_primary(DisplayChannel *display);
void display_channel_push_monitors_config(DisplayChannel *display);
RedSurface *display_channel_validate_surface(DisplayChannel *display, uint32_t surface_id);
gboolean display_channel_surface_has_canvas(DisplayChannel *display, uint32_t surface_id);
void display_channel_reset_image_cache(DisplayChannel *self);
void display_channel_debug_oom(DisplayChannel *display, const char *msg);

View File

@ -450,11 +450,6 @@ static void destroy_primary_surface(RedWorker *worker, uint32_t surface_id)
display_channel_destroy_surface_wait(display, 0);
display_channel_surface_id_unref(display, 0);
/* FIXME: accessing private data only for warning purposes...
spice_warn_if_fail(ring_is_empty(&display->streams));
*/
spice_warn_if_fail(!display_channel_surface_has_canvas(display, surface_id));
worker->cursor_channel->reset();
}