[Spice-devel] [spice-server 00/10] Stop passing group_id around/simplify red_drawable_unref()

Frediano Ziglio fziglio at redhat.com
Mon Feb 15 12:32:26 UTC 2016


> 
> Hey,
> 
> Initally, I was trying to make red_drawable_unref() not take a
> DisplayChannel*
> argument so that it's easier to use from code where you have a RedDrawable
> but not
> a DisplayChannel * handy. While doing this, I realized that if we use
> QXLReleaseInfoExt instead of QXLReleaseInfo in red-parse-qxl.h, then we can
> simplify more code by no longer passing around the 'group_id' parameter which
> appears
> in some function prototypes.
> 
> This patch series achieves these 2 goals. More cleanups can be done on top of
> it,
> for example red_drawable_unref()/red_drawable_new() should be movable to
> red-parse-qxl.c now.
> Also, most structures from red-parse-qxl.h also need a
> qxl->st->qif->release_resource() call when they are no longer used, so
> a similar treatment to what is done for RedDrawable could be applied to them.

I think all structure in red-parser-qxl.h should have similar behaviour:
- reference counting
- dynamic allocation
- self knowledge on how to free

Also I think this should be incapsulated in a structure.

> 
> Christophe
> 

Acked the entire patchset.

Frediano


More information about the Spice-devel mailing list