xlib: Fix invocation of XRenderFindFormat()

The 'count' parameter is an indication to libXrender of the number of
matches to skip before reporting (rather than a limit on the number to
report). As we only want the first match, always pass 0.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-02-24 17:07:54 +00:00
parent 446a3dc5c0
commit 7658eced9a

View file

@ -482,7 +482,7 @@ _cairo_xlib_display_get_xrender_format_for_pixman(cairo_xlib_display_t *display,
#undef MASK
/* XXX caching? */
return XRenderFindFormat(dpy, mask, &tmpl, 1);
return XRenderFindFormat(dpy, mask, &tmpl, 0);
}
XRenderPictFormat *