Re: [PATCH 07/11] Move some more drawable functions to display channel

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

 



> 
> On Mon, Nov 16, 2015 at 12:06 PM, Frediano Ziglio <fziglio@xxxxxxxxxx> wrote:
> > From: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
> >
> > ---
> >  server/display-channel.h | 26 ++++++++++++++++++++++++++
> >  server/red_worker.c      | 30 ++----------------------------
> >  2 files changed, 28 insertions(+), 28 deletions(-)
> >
> > diff --git a/server/display-channel.h b/server/display-channel.h
> > index 2fdcd97..edbd4b9 100644
> > --- a/server/display-channel.h
> > +++ b/server/display-channel.h
> > @@ -498,6 +498,23 @@ static inline int is_same_drawable(Drawable *d1,
> > Drawable *d2)
> >      }
> >  }
> >
> > +static inline int is_drawable_independent_from_surfaces(Drawable
> > *drawable)
> > +{
> > +    int x;
> > +
> > +    for (x = 0; x < 3; ++x) {
> > +        if (drawable->surface_deps[x] != -1) {
> > +            return FALSE;
> > +        }
> > +    }
> > +    return TRUE;
> > +}
> > +
> > +static inline int has_shadow(RedDrawable *drawable)
> > +{
> > +    return drawable->type == QXL_COPY_BITS;
> > +}
> > +
> >  static inline int is_primary_surface(DisplayChannel *display, uint32_t
> >  surface_id)
> >  {
> >      if (surface_id == 0) {
> > @@ -506,4 +523,13 @@ static inline int is_primary_surface(DisplayChannel
> > *display, uint32_t surface_i
> >      return FALSE;
> >  }
> >
> > +static inline void region_add_clip_rects(QRegion *rgn, SpiceClipRects
> > *data)
> > +{
> > +    int i;
> > +
> > +    for (i = 0; i < data->num_rects; i++) {
> > +        region_add(rgn, data->rects + i);
> > +    }
> > +}
> > +
> >  #endif /* DISPLAY_CHANNEL_H_ */
> > diff --git a/server/red_worker.c b/server/red_worker.c
> > index 4734187..0d17085 100644
> > --- a/server/red_worker.c
> > +++ b/server/red_worker.c
> > @@ -1863,18 +1863,6 @@ static void
> > display_channel_stream_maintenance(DisplayChannel *display,
> >      }
> >  }
> >
> > -static inline int is_drawable_independent_from_surfaces(Drawable
> > *drawable)
> > -{
> > -    int x;
> > -
> > -    for (x = 0; x < 3; ++x) {
> > -        if (drawable->surface_deps[x] != -1) {
> > -            return FALSE;
> > -        }
> > -    }
> > -    return TRUE;
> > -}
> > -
> >  static inline int red_current_add_equal(DisplayChannel *display, DrawItem
> >  *item, TreeItem *other)
> >  {
> >      DrawItem *other_draw_item;
> > @@ -2145,15 +2133,6 @@ static int current_add(DisplayChannel *display, Ring
> > *ring, Drawable *drawable)
> >      return TRUE;
> >  }
> >
> > -static void add_clip_rects(QRegion *rgn, SpiceClipRects *data)
> > -{
> > -    int i;
> > -
> > -    for (i = 0; i < data->num_rects; i++) {
> > -        region_add(rgn, data->rects + i);
> > -    }
> > -}
> > -
> >  static int current_add_with_shadow(DisplayChannel *display, Ring *ring,
> >  Drawable *item)
> >  {
> >  #ifdef RED_WORKER_STAT
> > @@ -2198,11 +2177,6 @@ static int current_add_with_shadow(DisplayChannel
> > *display, Ring *ring, Drawable
> >      return TRUE;
> >  }
> >
> > -static inline int has_shadow(RedDrawable *drawable)
> > -{
> > -    return drawable->type == QXL_COPY_BITS;
> > -}
> > -
> >  static void drawable_update_streamable(DisplayChannel *display, Drawable
> >  *drawable)
> >  {
> >      RedDrawable *red_drawable = drawable->red_drawable;
> > @@ -2556,7 +2530,7 @@ static inline void red_process_draw(RedWorker
> > *worker, RedDrawable *red_drawable
> >          QRegion rgn;
> >
> >          region_init(&rgn);
> > -        add_clip_rects(&rgn, red_drawable->clip.rects);
> > +        region_add_clip_rects(&rgn, red_drawable->clip.rects);
> >          region_and(&drawable->tree_item.base.rgn, &rgn);
> >          region_destroy(&rgn);
> >      }
> > @@ -4983,7 +4957,7 @@ static void
> > surface_lossy_region_update(DisplayChannelClient *dcc,
> >          region_init(&clip_rgn);
> >          region_init(&draw_region);
> >          region_add(&draw_region, &drawable->bbox);
> > -        add_clip_rects(&clip_rgn, drawable->clip.rects);
> > +        region_add_clip_rects(&clip_rgn, drawable->clip.rects);
> >          region_and(&draw_region, &clip_rgn);
> >          if (lossy) {
> >              region_or(surface_lossy_region, &draw_region);
> > --
> > 2.4.3
> >
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
> Seems good, ACK!
> 

Merged

Frediano
_______________________________________________
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]