Since we have the layers.use-image-offscreen-surfaces preference controlling whether or not Cairo uses xrender for content and canvas, it is more useful to have gfx.xrender.enabled to function independently to determine which compositor backend is used (X11 or basic) is used. However, currently, if you use any content backend other than Cairo, xrender no longer works for compositing at all. This is confusing and most people do not seem to expect this behavior. Especially as we move towards potentially using Skia content on Linux, it would be nice to have this behavior to be able to evaluate if xrender is worthwhile at all for compositing in conjunction with Skia, or if we should just ditch xrender entirely.
Created attachment 8724600 [details] [diff] [review] allow gfx.xrender.enabled pref to work for compositing even if content backend is not Cairo This moves the Cairo dependency into UseImageOffscreenSurfaces() - rather, this pref only takes effect at all if using Cairo, otherwise it always defaults to true. UseXRender() now works regardless of content backend. Move some crufty decision-logic out of nsShmImage into widget/gtk where it belonged in the first place.
Created attachment 8724611 [details] [diff] [review] allow gfx.xrender.enabled pref to work for compositing even if content backend is not Cairo When testing this patch on GTK2 just to be sure, I noticed some collateral damage when interacting with GTK2 and Skia from bug 1231881: https://hg.mozilla.org/mozilla-central/diff/0cd53e82df1f/gfx/thebes/gfxXlibNativeRenderer.cpp It was supposed to support the case retrieving a CAIRO_CONTEXT failed, so that non-Cairo targets would work. Fix is simple in this case, and GTK2, Skia, and xrender are all happy together again.
Attachment #8724611 - Flags: review?(jmuizelaar) → review+
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox47: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.