[Spice-devel] [PATCH spice-gtk 01/14] display: use bitfields for surface flags
Christophe Fergeau
cfergeau at redhat.com
Thu Sep 12 08:56:54 PDT 2013
ACK
On Thu, Sep 12, 2013 at 02:09:09PM +0200, Marc-André Lureau wrote:
> Checking by value make the flag fields useless. Unfortunately, when
> adding more flags, the server will have to ensure it can safely send it,
> by checking some of new client caps (for some features).
> ---
> gtk/channel-display.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gtk/channel-display.c b/gtk/channel-display.c
> index 75fa8c2..704d5a7 100644
> --- a/gtk/channel-display.c
> +++ b/gtk/channel-display.c
> @@ -1741,7 +1741,8 @@ static void display_handle_surface_create(SpiceChannel *channel, SpiceMsgIn *in)
> surface->stride = create->width * 4;
> surface->size = surface->height * surface->stride;
>
> - if (create->flags == SPICE_SURFACE_FLAGS_PRIMARY) {
> + if (create->flags & SPICE_SURFACE_FLAGS_PRIMARY) {
> + SPICE_DEBUG("primary flags: %d", create->flags);
> surface->primary = true;
> create_canvas(channel, surface);
> if (c->mark_false_event_id != 0) {
> --
> 1.8.3.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130912/074e7c09/attachment.pgp>
More information about the Spice-devel
mailing list