Bug 8602

Summary: renderutil needs xcb_renderutil_composite_string/glyph_8/16/32 functions
Product: XCB Reporter: Ian Osgood <iano>
Component: UtilsAssignee: Jamey Sharp <jamey>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Ian Osgood 2006-10-11 08:01:18 UTC
The core xcb_render_composite_glyph_8/16/32 requests are too primitive, taking only a byte array whose 
length is difficult to determine.  We should add xcb_renderutil_composite_string/glyph_8/16/32 functions 
to the renderutil libary to make this more convenient.  These will be direct ports or the libXrender 
XRenderComposite* series of functions found in libXrender/src/Glyph.c.
Comment 1 Ian Osgood 2006-10-14 16:30:16 UTC
I've added a prototype API to util/renderutil, to be used as follows:

  const uint8_t glyphs[] = (const uint8_t *)"Hello, world!";
  size_t len = strlen("Hello, world!");
  xcb_render_util_composite_text_stream_t *s;
  s = xcb_render_util_composite_text_stream( glyphset, len, 0);
  xcb_render_util_glyphs_8( s, dx, dy, len, glyphs);
  xcb_render_util_composite_text( c, op, src, dst, mask_format, src_x, src_y, s);
  xcb_render_util_composite_text_free( s);

Please review. Next step is testing, by either:
1) using it in demo/rendercheck (requiring font support and a glyph cache to be added)
2) implementing the font rendering backend to cairo
Comment 2 Ian Osgood 2006-11-14 08:57:40 UTC
Seems to work well enough. Cairo and Xft have been modified to use the new interface successfully.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.