[Xcb] [PULL] Re: [PATCH proto 1/1] Replace valueparam with switch-bitcase in render

Christian Linhart chris at DemoRecorder.com
Sat Feb 21 02:45:37 PST 2015


Hi Jaya,

I have merged your patch to upstream:
http://cgit.freedesktop.org/xcb/proto/commit/?id=e0a4f7ba911a5b933c939d7c696672d1bba7f2af

Thank you for your patch.

I will merge the other pending patches soon.

Chris


On 11/25/14 15:55, Christian Linhart wrote:
> This change is backward compatible as has been previously discussed and explained on Oct 18th.
>
> Backwards compatibility can be checked with the testcase provided by Asalle on Oct 27th.
>
> The problem with the missing sizeof functions was fixed as a side-effect of the following patch:
> http://cgit.freedesktop.org/xcb/libxcb/commit/?id=277ea629def6728c9d826ff88e95b31c3e25915f
>
> Therefore:
> Reviewed-by: Christian Linhart <chris at demorecorder.com>
>
> Chris
>
>
> On 11/24/14 18:02, Jaya Tiwari wrote:
>> Changed valueparam to switch bitcase in render extension for the requests :
>>
>> CreatePicture
>> ChangePicture
>>
>> The changes of valueparam to switch has been made as per the specs for
>> the render extension for the possible
>> values of value-mask and value-list
>>
>> CreatePicture :
>> http://cgit.freedesktop.org/xorg/proto/renderproto/tree/renderproto.txt?id=renderproto-0.11.1#n572
>>
>> ChangePicture:
>> http://cgit.freedesktop.org/xorg/proto/renderproto/tree/renderproto.txt?id=renderproto-0.11.1#n668
>>
>> The backward compatibility for the extension was checked successfully
>> by rendering shapes with libraries having
>> valueparam and then by having libraries with switch bitcase.
>>
>> Signed-off-by: Jaya Tiwari <tiwari.jaya18 at gmail.com>
>> ---
>>  src/render.xml | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
>>  1 file changed, 112 insertions(+), 6 deletions(-)
>>
>> diff --git a/src/render.xml b/src/render.xml
>> index 55b73f7..c54608e 100644
>> --- a/src/render.xml
>> +++ b/src/render.xml
>> @@ -280,16 +280,122 @@ <request name="CreatePicture" opcode="4">
>>      <field type="PICTURE" name="pid" />
>>      <field type="DRAWABLE" name="drawable" />
>>      <field type="PICTFORMAT" name="format" />
>> -    <valueparam value-mask-type="CARD32"
>> -                value-mask-name="value_mask"
>> -                value-list-name="value_list" />
>> +    <field type="CARD32" name="value_mask" mask="CP"/>
>> +    <switch name="value_list">
>> +      <fieldref>value_mask</fieldref>
>> +      <bitcase>
>> +        <enumref ref="CP">Repeat</enumref>
>> +        <field type="CARD32" name="repeat" enum="Repeat"/>
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">AlphaMap</enumref>
>> +        <field type="PICTURE" name="alphamap" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">AlphaXOrigin</enumref>
>> +        <field type="INT32" name="alphaxorigin" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">AlphaYOrigin</enumref>
>> +        <field type="INT32" name="alphayorigin" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">ClipXOrigin</enumref>
>> +        <field type="INT32" name="clipxorigin" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">ClipYOrigin</enumref>
>> +        <field type="INT32" name="clipyorigin" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">ClipMask</enumref>
>> +        <field type="PIXMAP" name="clipmask" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">GraphicsExposure</enumref>
>> +        <field type="CARD32" name="graphicsexposure" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">SubwindowMode</enumref>
>> +        <field type="CARD32" name="subwindowmode" enum="SubwindowMode"/>
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">PolyEdge</enumref>
>> +        <field type="CARD32" name="polyedge" enum="PolyEdge"/>
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">PolyMode</enumref>
>> +        <field type="CARD32" name="polymode" enum="PolyMode"/>
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">Dither</enumref>
>> +        <field type="ATOM" name="dither" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">ComponentAlpha</enumref>
>> +        <field type="CARD32" name="componentalpha" />
>> +      </bitcase>
>> +    </switch>
>>    </request>
>>
>>    <request name="ChangePicture" opcode="5">
>>      <field type="PICTURE" name="picture" />
>> -    <valueparam value-mask-type="CARD32"
>> -                value-mask-name="value_mask"
>> -                value-list-name="value_list" />
>> +    <field type="CARD32" name="value_mask" mask="CP"/>
>> +    <switch name="value_list">
>> +      <fieldref>value_mask</fieldref>
>> +      <bitcase>
>> +        <enumref ref="CP">Repeat</enumref>
>> +        <field type="CARD32" name="repeat" enum="Repeat"/>
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">AlphaMap</enumref>
>> +        <field type="PICTURE" name="alphamap" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">AlphaXOrigin</enumref>
>> +        <field type="INT32" name="alphaxorigin" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">AlphaYOrigin</enumref>
>> +        <field type="INT32" name="alphayorigin" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">ClipXOrigin</enumref>
>> +        <field type="INT32" name="clipxorigin" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">ClipYOrigin</enumref>
>> +        <field type="INT32" name="clipyorigin" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">ClipMask</enumref>
>> +        <field type="PIXMAP" name="clipmask" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">GraphicsExposure</enumref>
>> +        <field type="CARD32" name="graphicsexposure" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">SubwindowMode</enumref>
>> +        <field type="CARD32" name="subwindowmode" enum="SubwindowMode"/>
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">PolyEdge</enumref>
>> +        <field type="CARD32" name="polyedge" enum="PolyEdge"/>
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">PolyMode</enumref>
>> +        <field type="CARD32" name="polymode" enum="PolyMode"/>
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">Dither</enumref>
>> +        <field type="ATOM" name="dither" />
>> +      </bitcase>
>> +      <bitcase>
>> +        <enumref ref="CP">ComponentAlpha</enumref>
>> +        <field type="CARD32" name="componentalpha" />
>> +      </bitcase>
>> +    </switch>
>>    </request>
>>
>>    <request name="SetPictureClipRectangles" opcode="6">
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb



More information about the Xcb mailing list