Sorry, JavaScript malfunction. What I meant to say was...<br><br>I have a patch for the xlib stuff just about ready, but I wanted to check something first. In the interest of removing compile-time RENDER_MAJOR/MINOR checking, I made this change:<br>
<br>--- a/src/cairo-xlib-surface.c<br>+++ b/src/cairo-xlib-surface.c<br>@@ -156,13 +156,10 @@ static const XTransform identity = { {<br> <br> #define CAIRO_SURFACE_RENDER_HAS_PDF_OPERATORS(surface) CAIRO_SURFACE_RENDER_AT_LEAST((surface), 0, 11)<br>
<br>-#if RENDER_MAJOR > 0 || RENDER_MINOR >= 11<br>-#define CAIRO_SURFACE_RENDER_SUPPORTS_OPERATOR(surface, op) \<br>- (((op) <= CAIRO_OPERATOR_SATURATE) ? TRUE : (CAIRO_SURFACE_RENDER_HAS_PDF_OPERATORS (surface) ? (op) <= CAIRO_OPERATOR_HSL_LUMINOSITY : FALSE))<br>
-#else<br>-#define CAIRO_SURFACE_RENDER_SUPPORTS_OPERATOR(surface, op) \<br>- ((op) <= CAIRO_OPERATOR_SATURATE)<br>-#endif<br>+#define CAIRO_SURFACE_RENDER_SUPPORTS_OPERATOR(surface, op) \<br>+ ((op) <= CAIRO_OPERATOR_SATURATE || \<br>
+ (CAIRO_SURFACE_RENDER_HAS_PDF_OPERATORS(surface) && \<br>+ (op) <= CAIRO_OPERATOR_HSL_LUMINOSITY))<br><br><br>This has the effect of making CAIRO_SURFACE_RENDER_SUPPORTS_OPERATOR do a run-time check against the render version, as stored in the surface. This check should only occur for operators > SATURATE, assuming that the compiler does proper short-circuiting.<br>
<br>This seems correct to me, but it clearly changes cairo's behavior and performance when compiled on systems without the latest renderproto headers. Since that probably includes just about everyone right now, I thought I'd ask first. Does it look okay?<br>
<br>Damian<br><br>