On Thu, 2015-11-19 at 10:03 -0500, Frediano Ziglio wrote: > > On Wed, Nov 18, 2015 at 5:17 PM, Frediano Ziglio <fziglio@xxxxxxxxxx> wrote: > > > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx> > > > > > > --- > > > server/display-channel.c | 11 +++++++++++ > > > server/display-channel.h | 1 + > > > server/red_worker.c | 22 +++------------------- > > > 3 files changed, 15 insertions(+), 19 deletions(-) > > > > > > diff --git a/server/display-channel.c b/server/display-channel.c > > > index 1702bd6..ce973c5 100644 > > > --- a/server/display-channel.c > > > +++ b/server/display-channel.c > > > @@ -838,3 +838,14 @@ int > > > display_channel_wait_for_migrate_data(DisplayChannel *display) > > > } > > > return FALSE; > > > } > > > + > > > +void display_channel_flush_all_surfaces(DisplayChannel *display) > > > +{ > > > + int x; > > > + > > > + for (x = 0; x < NUM_SURFACES; ++x) { > > > + if (display->surfaces[x].context.canvas) { > > > + display_channel_current_flush(display, x); > > > + } > > > + } > > > +} > > > diff --git a/server/display-channel.h b/server/display-channel.h > > > index 595ced8..afb9ec5 100644 > > > --- a/server/display-channel.h > > > +++ b/server/display-channel.h > > > @@ -272,6 +272,7 @@ int > > > display_channel_add_drawable > > > (DisplayCha > > > void display_channel_current_flush > > > (DisplayChannel *display, > > > int > > > > > > surface_id); > > > int display_channel_wait_for_migrate_data > > > (DisplayChannel *display); > > > +void display_channel_flush_all_surfaces > > > (DisplayChannel *display); > > > > > > static inline int is_equal_path(SpicePath *path1, SpicePath *path2) > > > { > > > diff --git a/server/red_worker.c b/server/red_worker.c > > > index de9117a..51352a8 100644 > > > --- a/server/red_worker.c > > > +++ b/server/red_worker.c > > > @@ -6204,28 +6204,12 @@ static void > > > handle_dev_destroy_primary_surface_async(void *opaque, void *payload > > > destroy_primary_surface(worker, surface_id); > > > } > > > > > > -static void flush_all_surfaces(DisplayChannel *display) > > > -{ > > > - int x; > > > - > > > - for (x = 0; x < NUM_SURFACES; ++x) { > > > - if (display->surfaces[x].context.canvas) { > > > - display_channel_current_flush(display, x); > > > - } > > > - } > > > -} > > > - > > > -static void dev_flush_surfaces(RedWorker *worker) > > > -{ > > > - flush_all_qxl_commands(worker); > > > - flush_all_surfaces(worker->display_channel); > > > -} > > > - > > > static void handle_dev_flush_surfaces_async(void *opaque, void *payload) > > > { > > > RedWorker *worker = opaque; > > > > > > - dev_flush_surfaces(worker); > > > + flush_all_qxl_commands(worker); > > > + display_channel_flush_all_surfaces(worker->display_channel); > > > } > > > > > > static void handle_dev_stop(void *opaque, void *payload) > > > @@ -6236,7 +6220,7 @@ static void handle_dev_stop(void *opaque, void > > > *payload) > > > spice_assert(worker->running); > > > worker->running = FALSE; > > > red_display_clear_glz_drawables(worker->display_channel); > > > - flush_all_surfaces(worker->display_channel); > > > + display_channel_flush_all_surfaces(worker->display_channel); > > > /* todo: when the waiting is expected to take long (slow connection > > > and > > > * overloaded pipe), don't wait, and in case of migration, > > > * purge the pipe, send destroy_all_surfaces > > > > ACK! > > > > I would change the commit to ad least "worker: move > display_channel_flush_all_surfaces" Yes, I was going to suggest a slightly more detailed description as well. This is probably good enough. _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel