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

Yonit Halperin yhalperi at redhat.com
Sun Jul 10 13:27:39 PDT 2011


On 07/06/2011 04:38 PM, 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.
>
>
> Soren
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

Hi,
It looks like Render overlaps QXL_DRAW_ROP3. Maybe QXLRop3 can be exploited?

Cheers,
Yonit.


More information about the Spice-devel mailing list