[Spice-devel] RFC: Render support in the protocol

John A. Sullivan III jsullivan at opensourcedevel.com
Wed Jul 6 09:27:24 PDT 2011


On Wed, 2011-07-06 at 15:38 +0200, Soeren Sandmann wrote:
> RENDER is a very commonly used X extension that currently is not
> supported very well in SPICE. This leads to the QXL X driver having to
> read back pixels from the device, render in software, then transmit an
> image. This is currently the biggest performance issue with SPICE for X.
> 
> The specification for this extension can be found here:
> 
>     http://cgit.freedesktop.org/xorg/proto/renderproto/tree/renderproto.txt
> 
> Pixman is essentially a software implementation of Render, so there
> should be no issues getting the client to draw it. The issue is how to
> add support to the SPICE protocol
> 
> A straightforward way to is to add a new draw command, "Composite"
> containing all of the required attributes for render pictures:
> 
>            RED_DISPLAY_DRAW_COMPOSITE:
> 
>            OPERATOR     op
> 
>            ADDRESS      source_image
>            POINT        src_x, src_y
>            TRANSFORM    src_transform
>            REPEAT       src_repeat
>            FILTER       src_filter
> 
>            ADDRESS      mask_iamge
>            POINT        mask_x, mask_y,
>            TRANSFORM    mask_transform,
>            REPEAT       mask_repeat
>            FILTER       mask_filter
> 
> where:
> 
>         TRANSFORM is 6 fixpoint numbers describing an affine transform
> 
>         REPEAT is one of { NONE, NORMAL, REFLECT, PAD }
> 
>         FILTER is one of { NEAREST, BILINEAR }
> 
> This is quite a lot of data to send for each request though. There are
> some way to reduce the amount of data:
> 
> - REPEAT, FILTER could be stored in the same field since they have to
>   few possible values
> 
> - If transform is identity, it could be represented as a NULL address
>   instead of as six numbers.
> 
> - The fields for op, source and mask could be combined
> 
> The result would be this new command:
> 
>     RED_DISPLAY_DRAW_COMPOSITE:
> 
>     UINT32_T    info
>     ADDRESS     source_image
>     ADDRESS     source_transform        [ may be NULL ]
>     POINT16     src_origin
>     ADDRESS     mask_image              [ may be NULL ]
>     ADDRESS     mask_transform          [ may be NULL ]
>     POINT16     mask_origin
> 
> where info is a bitfield:
> 
>     [ operator : 8
>       src_filter : 2
>       mask_filter : 2
>       src_repeat : 2
>       mask_repeat : 2
>       component_alpha : 1
>       padding : 15                      // must be zero
>     ]
> 
> Comments appreciated.
<snip>
No comments on the code but I wonder if this is why our testing on our
Linux desktops has been so hot and cold with RDP performing better on
most common tasks than SPICE.  Very interesting.  Thanks - John



More information about the Spice-devel mailing list