[Spice-devel] [PATCH] declare and use message for RED_WORKER_MESSAGE_GL_SCANOUT

Christophe Fergeau cfergeau at redhat.com
Wed Mar 23 14:26:13 UTC 2016


On Wed, Mar 23, 2016 at 09:57:53AM -0400, Frediano Ziglio wrote:
> > 
> > On Wed, Mar 23, 2016 at 01:06:26PM +0000, Frediano Ziglio wrote:
> > > All other messages (even empty ones) have a structure defined.
> > 
> > This is purely for consistency? Or was this causing issues?
> > 
> 
> I don't think this patch is going to change much bits of code.
> Pure consistency.
> 
> > > 
> > > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > > ---
> > >  server/red-qxl.c    | 3 ++-
> > >  server/red-qxl.h    | 3 +++
> > >  server/red-worker.c | 2 +-
> > >  3 files changed, 6 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/server/red-qxl.c b/server/red-qxl.c
> > > index 7ef9fe1..4c1c3e6 100644
> > > --- a/server/red-qxl.c
> > > +++ b/server/red-qxl.c
> > > @@ -853,6 +853,7 @@ void spice_qxl_gl_scanout(QXLInstance *qxl,
> > >                            uint32_t stride, uint32_t format,
> > >                            int y_0_top)
> > >  {
> > > +    RedWorkerMessageGlScanout payload;
> > >      spice_return_if_fail(qxl != NULL);
> > >  
> > >      QXLState *qxl_state = qxl->st;
> > > @@ -877,7 +878,7 @@ void spice_qxl_gl_scanout(QXLInstance *qxl,
> > >  
> > >      /* FIXME: find a way to coallesce all pending SCANOUTs */
> > >      dispatcher_send_message(&qxl_state->dispatcher,
> > > -                            RED_WORKER_MESSAGE_GL_SCANOUT, NULL);
> > > +                            RED_WORKER_MESSAGE_GL_SCANOUT, &payload);
> > 
> > I'd set payload to 0 with
> > RedWorkerMessageGlScanout payload = { 0, };
> > or something like that if that's possible. Or add a comment that payload
> 
> I could use payload = {};
> However there are lot of similar structures without any comment or empty
> initialization.
> 
> I'd go for a
> 
> payload = { /* empty */ };
> 

Fine with me.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160323/3d8f0483/attachment.sig>


More information about the Spice-devel mailing list