gfx.xrender.enabled preference depends on Cairo content

RESOLVED FIXED in Firefox 47



3 years ago
3 years ago


(Reporter: lsalzman, Assigned: lsalzman)



Firefox Tracking Flags

(firefox47 fixed)


(Whiteboard: [gfx-noted])


(1 attachment, 1 obsolete attachment)



3 years ago
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.

Comment 1

3 years ago
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.
Attachment #8724600 - Flags: review?(karlt)

Comment 2

3 years ago
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:

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+

Comment 5

3 years ago
Last Resolved: 3 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.