[Xcb] XRenderCompositeString32

Russell Shaw rjshaw at netspace.net.au
Thu Oct 12 00:28:19 PDT 2006


Vincent Torri wrote:
> 
> 
> On Thu, 12 Oct 2006, Russell Shaw wrote:
> 
>> Hi,
>> In XRender.h, we have:
>>
>> void
>> XRenderCompositeString32 (Display            *dpy,
>>               int                op,
>>               Picture            src,
>>               Picture            dst,
>>               _Xconst XRenderPictFormat *maskFormat,
>>               GlyphSet            glyphset,
>>               int                xSrc,
>>               int                ySrc,
>>               int                xDst,
>>               int                yDst,
>>               _Xconst unsigned int        *string,
>>               int                nchar);
>>
>>
>> In xcb/render.h, we have:
>>
>> xcb_void_cookie_t
>> xcb_render_composite_glyphs_32_checked (xcb_connection_t        *c,
>>                                        uint8_t                  op,
>>                                        xcb_render_picture_t     src,
>>                                        xcb_render_picture_t     dst,
>>                                        xcb_render_pictformat_t  mask_format,
>>                                        xcb_render_glyphset_t    glyphset,
>>                                        int16_t                  src_x,
>>                                        int16_t                  src_y,
>>                                        uint32_t                 glyphcmds_len,
>>                                        const uint8_t            *glyphcmds)
>>
>>
>> In xcb_render_composite_glyphs_32_checked(), shouldn't there be "const 
>> uint32_t *glyphcmds" instead of "const uint8_t *glyphcmds" ?
>>
>> It is misleading, because glyphcmds_len could be mistaken for the byte 
>> length instead of the number of uint32_t elements.
> 
> 
> I think that you are right (http://keithp.com/~keithp/render/protocol.html)
> 
> I also think that there is the same error for xcb_render_composite_glyphs_16.

The params dst_x and dst_y are also missing. I made a patch.
-------------- next part --------------
diff --git a/src/extensions/render.xml b/src/extensions/render.xml
index 88e9a40..7868451 100644
--- a/src/extensions/render.xml
+++ b/src/extensions/render.xml
@@ -390,6 +390,8 @@ for licensing information.
     <field type="GLYPHSET" name="glyphset" />
     <field type="INT16" name="src_x" />
     <field type="INT16" name="src_y" />
+    <field type="INT16" name="dst_x" />
+    <field type="INT16" name="dst_y" />
     <list type="BYTE" name="glyphcmds" />
   </request>
 
@@ -402,7 +404,9 @@ for licensing information.
     <field type="GLYPHSET" name="glyphset" />
     <field type="INT16" name="src_x" />
     <field type="INT16" name="src_y" />
-    <list type="BYTE" name="glyphcmds" />
+    <field type="INT16" name="dst_x" />
+    <field type="INT16" name="dst_y" />
+    <list type="CARD16" name="glyphcmds" />
   </request>
 
   <request name="CompositeGlyphs32" opcode="25">
@@ -414,7 +418,9 @@ for licensing information.
     <field type="GLYPHSET" name="glyphset" />
     <field type="INT16" name="src_x" />
     <field type="INT16" name="src_y" />
-    <list type="BYTE" name="glyphcmds" />
+    <field type="INT16" name="dst_x" />
+    <field type="INT16" name="dst_y" />
+    <list type="CARD32" name="glyphcmds" />
   </request>
 
   <!-- new in version 0.1 -->


More information about the Xcb mailing list