Re: [PATCH 18/18] worker: rename update_area

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 20, 2015 at 5:00 PM, Jonathon Jongsma <jjongsma@xxxxxxxxxx> wrote:
> Fine with me.
>
> Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
>
> On Fri, 2015-11-20 at 11:17 +0000, Frediano Ziglio wrote:
>> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
>>
>> ---
>>  server/display-channel.c | 13 +++++++------
>>  server/display-channel.h | 10 +++++++---
>>  server/red_worker.c      | 24 ++++++++++++------------
>>  3 files changed, 26 insertions(+), 21 deletions(-)
>>
>> diff --git a/server/display-channel.c b/server/display-channel.c
>> index 7aa3ea9..0ec27e3 100644
>> --- a/server/display-channel.c
>> +++ b/server/display-channel.c
>> @@ -752,9 +752,10 @@ static int current_add(DisplayChannel *display, Ring
>> *ring, Drawable *drawable)
>>          current_add_drawable(display, drawable, ring);
>>      } else {
>>          /*
>> -         * red_detach_streams_behind can affect the current tree since it may
>> -         * trigger calls to update_area. Thus, the drawable should be added
>> to the tree
>> -         * before calling red_detach_streams_behind
>> +         * red_detach_streams_behind can affect the current tree since
>> +         * it may trigger calls to display_channel_draw. Thus, the
>> +         * drawable should be added to the tree before calling
>> +         * red_detach_streams_behind
>>           */
>>          current_add_drawable(display, drawable, ring);
>>          if (is_primary_surface(display, drawable->surface_id)) {
>> @@ -1109,7 +1110,7 @@ void display_channel_drawable_unref(DisplayChannel
>> *display, Drawable *drawable)
>>      display->drawable_count--;
>>  }
>>
>> -static void drawable_deps_update(DisplayChannel *display, Drawable *drawable)
>> +static void drawable_deps_draw(DisplayChannel *display, Drawable *drawable)
>>  {
>>      int x;
>>      int surface_id;
>> @@ -1118,7 +1119,7 @@ static void drawable_deps_update(DisplayChannel
>> *display, Drawable *drawable)
>>          surface_id = drawable->surface_deps[x];
>>          if (surface_id != -1 && drawable->depend_items[x].drawable) {
>>              depended_item_remove(&drawable->depend_items[x]);
>> -            red_update_area(display, &drawable->red_drawable
>> ->surfaces_rects[x], surface_id);
>> +            display_channel_draw(display, &drawable->red_drawable
>> ->surfaces_rects[x], surface_id);
>>          }
>>      }
>>  }
>> @@ -1129,7 +1130,7 @@ void drawable_draw(DisplayChannel *display, Drawable
>> *drawable)
>>      SpiceCanvas *canvas;
>>      SpiceClip clip = drawable->red_drawable->clip;
>>
>> -    drawable_deps_update(display, drawable);
>> +    drawable_deps_draw(display, drawable);
>>
>>      surface = &display->surfaces[drawable->surface_id];
>>      canvas = surface->context.canvas;
>> diff --git a/server/display-channel.h b/server/display-channel.h
>> index 266df2c..a454218 100644
>> --- a/server/display-channel.h
>> +++ b/server/display-channel.h
>> @@ -250,6 +250,13 @@ typedef struct UpgradeItem {
>>  } UpgradeItem;
>>
>>
>> +void                       display_channel_draw
>>  (DisplayChannel *display,
>> +                                                                      const
>> SpiceRect *area,
>> +                                                                      int
>> surface_id);
>> +void                       display_channel_draw_till
>>  (DisplayChannel *display,
>> +                                                                      const
>> SpiceRect *area,
>> +                                                                      int
>> surface_id,
>> +
>>  Drawable *last);
>>  void                       display_channel_free_some
>>  (DisplayChannel *display);
>>  void                       display_channel_set_stream_video
>>  (DisplayChannel *display,
>>                                                                        int
>> stream_video);
>> @@ -395,8 +402,5 @@ void detach_streams_behind(DisplayChannel *display,
>> QRegion *region, Drawable *d
>>  void drawable_draw(DisplayChannel *display, Drawable *item);
>>  void current_remove_all(DisplayChannel *display, int surface_id);
>>  void drawables_init(DisplayChannel *display);
>> -void red_update_area(DisplayChannel *display, const SpiceRect *area, int
>> surface_id);
>> -void red_update_area_till(DisplayChannel *display, const SpiceRect *area, int
>> surface_id,
>> -                          Drawable *last);
>>
>>  #endif /* DISPLAY_CHANNEL_H_ */
>> diff --git a/server/red_worker.c b/server/red_worker.c
>> index ec488db..150b166 100644
>> --- a/server/red_worker.c
>> +++ b/server/red_worker.c
>> @@ -494,9 +494,9 @@ static void
>> dcc_detach_stream_gracefully(DisplayChannelClient *dcc,
>>                      stream_id, stream->current != NULL);
>>          rect_debug(&upgrade_area);
>>          if (update_area_limit) {
>> -            red_update_area_till(DCC_TO_DC(dcc), &upgrade_area, 0,
>> update_area_limit);
>> +            display_channel_draw_till(DCC_TO_DC(dcc), &upgrade_area, 0,
>> update_area_limit);
>>          } else {
>> -            red_update_area(DCC_TO_DC(dcc), &upgrade_area, 0);
>> +            display_channel_draw(DCC_TO_DC(dcc), &upgrade_area, 0);
>>          }
>>          dcc_add_surface_area_image(dcc, 0, &upgrade_area, NULL, FALSE);
>>      }
>> @@ -601,7 +601,7 @@ static void red_get_area(DisplayChannel *display, int
>> surface_id, const SpiceRec
>>
>>      surface = &display->surfaces[surface_id];
>>      if (update) {
>> -        red_update_area(display, area, surface_id);
>> +        display_channel_draw(display, area, surface_id);
>>      }
>>
>>      canvas = surface->context.canvas;
>> @@ -712,7 +712,7 @@ static inline int
>> red_handle_depends_on_target_surface(DisplayChannel *display,
>>          Drawable *drawable;
>>          DependItem *depended_item = SPICE_CONTAINEROF(ring_item, DependItem,
>> ring_item);
>>          drawable = depended_item->drawable;
>> -        red_update_area(display, &drawable->red_drawable->bbox, drawable
>> ->surface_id);
>> +        display_channel_draw(display, &drawable->red_drawable->bbox, drawable
>> ->surface_id);
>>      }
>>
>>      return TRUE;
>> @@ -925,7 +925,7 @@ static void validate_area(DisplayChannel *display, const
>> SpiceRect *area, uint32
>>      Renders drawables for updating the requested area, but only drawables
>> that are older
>>      than 'last' (exclusive).
>>  */
>> -void red_update_area_till(DisplayChannel *display, const SpiceRect *area, int
>> surface_id,
>> +void display_channel_draw_till(DisplayChannel *display, const SpiceRect
>> *area, int surface_id,
>>                            Drawable *last)
>>  {
>>      RedSurface *surface;
>> @@ -992,10 +992,10 @@ void red_update_area_till(DisplayChannel *display, const
>> SpiceRect *area, int su
>>          container = now->tree_item.base.container;
>>          current_remove_drawable(display, now);
>>          container_cleanup(container);
>> -        /* drawable_draw may call red_update_area for the surfaces 'now'
>> depends on. Notice,
>> -           that it is valid to call red_update_area in this case and not
>> red_update_area_till:
>> +        /* drawable_draw may call display_channel_draw for the surfaces 'now'
>> depends on. Notice,
>> +           that it is valid to call display_channel_draw in this case and not
>> display_channel_draw_till:
>>             It is impossible that there was newer item then 'last' in one of
>> the surfaces
>> -           that red_update_area is called for, Otherwise, 'now' would have
>> already been rendered.
>> +           that display_channel_draw is called for, Otherwise, 'now' would
>> have already been rendered.
>>             See the call for red_handle_depends_on_target_surface in
>> red_process_draw */
>>          drawable_draw(display, now);
>>          display_channel_drawable_unref(display, now);
>> @@ -1003,7 +1003,7 @@ void red_update_area_till(DisplayChannel *display, const
>> SpiceRect *area, int su
>>      validate_area(display, area, surface_id);
>>  }
>>
>> -void red_update_area(DisplayChannel *display, const SpiceRect *area, int
>> surface_id)
>> +void display_channel_draw(DisplayChannel *display, const SpiceRect *area, int
>> surface_id)
>>  {
>>      RedSurface *surface;
>>      Ring *ring;
>> @@ -1176,7 +1176,7 @@ static int red_process_commands(RedWorker *worker,
>> uint32_t max_pipe_size, int *
>>                  spice_warning("Invalid surface in QXL_CMD_UPDATE");
>>                  break;
>>              }
>> -            red_update_area(worker->display_channel, &update.area,
>> update.surface_id);
>> +            display_channel_draw(worker->display_channel, &update.area,
>> update.surface_id);
>>              worker->qxl->st->qif->notify_update(worker->qxl,
>> update.update_id);
>>              release_info_ext.group_id = ext_cmd.group_id;
>>              release_info_ext.info = update.release_info;
>> @@ -1826,7 +1826,7 @@ static void
>> red_add_lossless_drawable_dependencies(RedChannelClient *rcc,
>>      } else {
>>          sync_rendered = FALSE;
>>          for (i = 0; i < num_deps; i++) {
>> -            red_update_area_till(display, deps_areas[i],
>> +            display_channel_draw_till(display, deps_areas[i],
>>                                   deps_surfaces_ids[i], item);
>>          }
>>      }
>> @@ -4356,7 +4356,7 @@ void display_channel_update(DisplayChannel *display,
>>      spice_return_if_fail(validate_surface(display, surface_id));
>>
>>      red_get_rect_ptr(&rect, area);
>> -    red_update_area(display, &rect, surface_id);
>> +    display_channel_draw(display, &rect, surface_id);
>>
>>      surface = &display->surfaces[surface_id];
>>      if (!*qxl_dirty_rects) {
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

ACK!

-- 
Fabiano Fidêncio
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]