Summary: | Buffer not flushed when drawing R plots | ||
---|---|---|---|
Product: | cairo | Reporter: | Milan Bouchet-Valat <nalimilan> |
Component: | xlib backend | Assignee: | Chris Wilson <chris> |
Status: | RESOLVED NOTOURBUG | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.12.8 | ||
Hardware: | x86-64 (AMD64) | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Milan Bouchet-Valat
2013-01-06 17:50:22 UTC
Broad guess: R is not calling cairo_surface_flush() when it should. Before this function is called, the content of the drawable used is undefined. Cairo 1.12 makes more use of this requirement (which has been there since forever). I would be very surprised if this were actually a bug in cairo. Ok, I went and checked R's source code: R-2.15.2/src/modules/X11/devX11.c, function handleEvent(), line 750. This is the handling of Expose events and it just does a cairo_paint(xd->xcc). This also needs cairo_surface_flush(xd->xcs). Thanks for looking at the code, but your suggestion does not make any difference in my tests. The problem is, the Expose event is never triggered by X so that code is not run. I also tried adding cairo_surface_flush() calls in many other places, with no result. So I sent a mail to R-devel, let's see what they say: https://mailman.stat.ethz.ch/pipermail/r-devel/2013-January/065567.html Thanks! Sorry for reopening, but somebody downstream told me the bug does not happen using the Nouveau driver - so it would be an Intel specific bug. Does that help you identifying where the bug might be? Is it still possible that it is an R bug? I guess you're in the best position to tell me who I should complain to. ;-) Thanks! Actually, the bug happens with ATI's Catalyst proprietary driver, but not with NVidia's. To me, this sounds like the NVidia driver forces a draw/flush/something, while the others do not. Is that of any help? Damn, I was wrong again. Let me restate the situation: Intel and ATI Catalyst drivers suffer from the bug; Nouveau (*not* NVidia proprietary) does not suffer from it. OK, R developers have found how to use cairo_surface_flush() to fix the bug (where I failed), so you were right. But they complained that cairo_surface_flush() documentation "does not support this usage". Do you think this could be improved? Thanks for your help so far! |
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.