gfx.xrender.enabled preference depends on Cairo content

RESOLVED FIXED in Firefox 47

Status

()

Core
Graphics
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: lsalzman, Assigned: lsalzman)

Tracking

unspecified
mozilla47
Points:
---

Firefox Tracking Flags

(firefox47 fixed)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

2 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.
(Assignee)

Comment 1

2 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)
(Assignee)

Comment 2

2 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: 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 #8724600 - Attachment is obsolete: true
Attachment #8724600 - Flags: review?(karlt)
Attachment #8724611 - Flags: review?(jmuizelaar)
Attachment #8724611 - Flags: review?(jmuizelaar) → review+

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e13aaaaf1962
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.