Re: [PATCH v3 3/4] use QXLState instead of RedDispatcher

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

 



> 
> On Fri, Mar 04, 2016 at 03:13:27PM +0000, Frediano Ziglio wrote:
> > Considering that:
> > - QXLState is the state of QXLInstance implementation;
> > - RedDispatcher is the implementation of QXL;
> > - qif (QXLInterface*) field can be computed really easy from QXLInstance;
> > - most of its state is private.
> > Make all structure private and use QXLState instead of RedDispatcher.
> > 
> > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> > Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
> > ---
> >  server/cursor-channel.c  |   2 +-
> >  server/dcc-send.c        |  17 +-
> >  server/dcc.c             |   4 +-
> >  server/display-channel.c |   8 +-
> >  server/red-qxl.c         | 499
> >  +++++++++++++++++++++++++----------------------
> >  server/red-qxl.h         |  37 ++--
> >  server/red-worker.c      |  57 +++---
> >  server/red-worker.h      |   2 +-
> >  server/reds-private.h    |   2 +-
> >  server/reds.c            |  80 ++++----
> >  server/reds.h            |  11 +-
> >  11 files changed, 372 insertions(+), 347 deletions(-)
> > 
> > diff --git a/server/cursor-channel.c b/server/cursor-channel.c
> > index 268e34f..f5cb5ee 100644
> > --- a/server/cursor-channel.c
> > +++ b/server/cursor-channel.c
> > @@ -116,7 +116,7 @@ static void cursor_item_unref(CursorItem *item)
> >          return;
> >  
> >      cursor_cmd = item->red_cursor;
> > -    item->qxl->st->qif->release_resource(item->qxl,
> > cursor_cmd->release_info_ext);
> > +    qxl_get_interface(item->qxl)->release_resource(item->qxl,
> > cursor_cmd->release_info_ext);
> 
> For what it's worth, this could even become
> red_qxl_interface_release_resource(item->qxl,
> cursor_cmd->release_resource_ext)
> if we want to hide the function pointers.
> 

Actually this could even became a no-op :)
I forget about this detail... must be in one of my patches...

> > diff --git a/server/red-worker.h b/server/red-worker.h
> > index e51e261..0f9cf61 100644
> > --- a/server/red-worker.h
> > +++ b/server/red-worker.h
> > @@ -90,7 +90,7 @@ static inline void red_pipes_add_verb(RedChannel
> > *channel, uint16_t verb)
> >      }
> >  }
> >  
> > -RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher
> > *red_dispatcher);
> > +RedWorker* red_worker_new(QXLInstance *qxl, QXLState *qxl_state);
> >  bool       red_worker_run(RedWorker *worker);
> >  RedChannel* red_worker_get_cursor_channel(RedWorker *worker);
> >  RedChannel* red_worker_get_display_channel(RedWorker *worker);
> > diff --git a/server/reds-private.h b/server/reds-private.h
> > index f567929..7877c73 100644
> > --- a/server/reds-private.h
> > +++ b/server/reds-private.h
> > @@ -241,7 +241,7 @@ struct RedsState {
> >  
> >      RedSSLParameters ssl_parameters;
> >      SpiceCoreInterfaceInternal *core;
> > -    GList *dispatchers;
> > +    GList *red_qxls;
> 
> qxl_states rather than red_qxls maybe?
> 

Changed.

> Looks good either way,
> 
> Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>
> 
> Christophe
> 

Going to do some rebases now... or a bit later

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]