[cairo-bugs] [Bug 12210] build breaks on compilation after successful configuration

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Aug 31 15:39:48 PDT 2007


http://bugs.freedesktop.org/show_bug.cgi?id=12210





------- Comment #7 from sick_soul at yahoo.it  2007-08-31 15:39 PST -------
(In reply to comment #6)
> (In reply to comment #5)
> > I started to look at it, I am thinking about splitting cairo-xlib-surface.c
> > in two, stuffing everything that requires render extensions
> > into cairo-xlib-surface-xrender.c, and possibly export
> > an interface in cairo-xlib-surface-xrender.h to make available to
> > cairo-xlib-surface.c . Still very cloudy, but the idea is to clutter
> > with preprocessor conditionals as little as possible. 
> 
> I don't think separating them makes much sense.

I still think it would make sense to isolate the xrender stuff,
but I will try to first implement it with a bunch of ifdefs, to see
if I can get it to compile/work first.

> > ATM I have wrapped part of the struct _cairo_xlib_surface declaration in
> > cairo-xlib-surface-private.h in an if like this:
> > 
> > #if CAIRO_HAS_XLIB_XRENDER_SURFACE
> >     int render_major;
> >     int render_minor;
> >     Picture dst_picture, src_picture;
> >     XRenderPictFormat *xrender_format;
> >     XTransform xtransform;
> > #endif
> > 
> > but maybe something better will come to mind.
> > Tomorrow I'll start going through the functions in the .c in more
> > detail, trying to understand how this thing works.
> > 
> > Btw, I've noticed that functions are referenced in a backend table/structure,
> > and in some cases some of these functions only have an implementation that
> > requires render extensions. Should I just put NULL there in these cases
> > and hope for the best? (that applications still work?)
> 
> If you do NULL, cairo will use the fallback code.  So yes.  But you can also
> just return UNSUPPORTED.
> As I said, the current code does work with an X
> server without Xrender.  So, you already got all the answers in there.  Just
> follow what happens if Xrender is detected to be unavailable at run-time and
> make it do the same at compile time.
> 
> > For example, I singled out
> > 
> > _cairo_xlib_surface_create_similar,
> > _cairo_xlib_surface_fill_rectangles,
> > _cairo_xlib_surface_composite_trapezoids,
> > _cairo_xlib_surface_is_similar
> > 
> > as currently being render-ext-only (or so they look to me).
> > Does this make any sense? The domain is very unfamiliar to me.
> 
> There's at least _cairo_xlib_show_glyphs too.  show_glyphs and
> composite_trapezoids should become UNSUPPORTED/NULL with no render I guess, 
> the rest should already have paths working without Xrender.  
> is_similar definitely should be available still.

ok, is_similar without xrender will then just return the
result of _cairo_xlib_surface_same_screen.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the cairo-bugs mailing list