Bug 8602 - renderutil needs xcb_renderutil_composite_string/glyph_8/16/32 functions
Summary: renderutil needs xcb_renderutil_composite_string/glyph_8/16/32 functions
Status: RESOLVED FIXED
Alias: None
Product: XCB
Classification: Unclassified
Component: Utils (show other bugs)
Version: unspecified
Hardware: All All
: high normal
Assignee: Jamey Sharp
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-11 08:01 UTC by Ian Osgood
Modified: 2006-11-14 08:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.