Closed Bug 1251984 Opened 7 years ago Closed 7 years ago

gfx.xrender.enabled preference depends on Cairo content


(Core :: Graphics, defect)

Not set



Tracking Status
firefox47 --- fixed


(Reporter: lsalzman, Assigned: lsalzman)


(Whiteboard: [gfx-noted])


(1 file, 1 obsolete file)

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.
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.
Attachment #8724600 - Flags: review?(karlt)
When testing this patch on GTK2 just to be sure, I noticed some collateral damage when interacting with GTK2 and Skia from bug 1231881:

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 #8724600 - Attachment is obsolete: true
Attachment #8724600 - Flags: review?(karlt)
Attachment #8724611 - Flags: review?(jmuizelaar)
Attachment #8724611 - Flags: review?(jmuizelaar) → review+
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.