Bug 1719898 - Ignore WidgetTypeSupportsAcceleration() if webrender.unaccelerated-widget.force is enabled, r=aosmond,gfx-reviewers

Right now whenever `WidgetTypeSupportsAcceleration()` returns `false`
and `webrender.unaccelerated-widget.force` is enabled, things will
simply fail and the widget will just not get rendered (only since
Basic layers got removed?).

Thus ignore `WidgetTypeSupportsAcceleration()` in this case, that's
what the option is for.

Differential Revision: https://phabricator.services.mozilla.com/D127006
This commit is contained in:
Robert Mader 2021-09-30 13:57:13 +00:00
parent bee999e8cd
commit 6f0be45605

View File

@ -891,7 +891,8 @@ bool nsBaseWidget::IsSmallPopup() const {
bool nsBaseWidget::ComputeShouldAccelerate() { bool nsBaseWidget::ComputeShouldAccelerate() {
return gfx::gfxConfig::IsEnabled(gfx::Feature::HW_COMPOSITING) && return gfx::gfxConfig::IsEnabled(gfx::Feature::HW_COMPOSITING) &&
WidgetTypeSupportsAcceleration(); (WidgetTypeSupportsAcceleration() ||
StaticPrefs::gfx_webrender_unaccelerated_widget_force());
} }
bool nsBaseWidget::UseAPZ() { bool nsBaseWidget::UseAPZ() {