зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1697195 - Force enable Software WebRender if Fission is enabled. r=jrmuizel
Fission without WebRender is an unsupported configuration and enrolls users based on their compositor. However because of our own rollout of WebRender, a user might start in early beta with WebRender and lose it in late beta, while they remain enrolled in the Fission experiment. Also, a user could lose WebRender because of crashes or device reset, and we may fall back to Basic. This patch forces Software WebRender as available (but does not override Hardware WebRender) if Fission is enabled. It also prevents fallback to Basic layers when disabling acceleration due to crashes and runtime errors, so the user will be stuck with Software WebRender at a minimum. It also enables Software WebRender for Windows popups with transparency. Differential Revision: https://phabricator.services.mozilla.com/D107661
This commit is contained in:
Родитель
af1f74102c
Коммит
6fc115d39f
|
@ -13,6 +13,7 @@
|
|||
#include "gfxConfig.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "nsIGfxInfo.h"
|
||||
#include "nsIXULRuntime.h" // for FissionAutostart
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
|
@ -125,6 +126,8 @@ void gfxConfigManager::ConfigureWebRenderSoftware() {
|
|||
// (hardware). See bug 1656811.
|
||||
if (mWrSoftwareForceEnabled) {
|
||||
mFeatureWrSoftware->UserForceEnable("Force enabled by pref");
|
||||
} else if (FissionAutostart()) {
|
||||
mFeatureWrSoftware->UserForceEnable("Force enabled by fission");
|
||||
} else if (mWrForceDisabled || mWrEnvForceDisabled) {
|
||||
// If the user set the pref to force-disable, let's do that. This
|
||||
// will override all the other enabling prefs
|
||||
|
|
|
@ -3359,7 +3359,8 @@ bool gfxPlatform::FallbackFromAcceleration(FeatureStatus aStatus,
|
|||
return true;
|
||||
}
|
||||
|
||||
if (StaticPrefs::gfx_webrender_fallback_basic_AtStartup()) {
|
||||
if (StaticPrefs::gfx_webrender_fallback_basic_AtStartup() &&
|
||||
!FissionAutostart()) {
|
||||
// Fallback from WebRender or Software WebRender to Basic.
|
||||
gfxCriticalNote << "Fallback (SW-)WR to Basic";
|
||||
if (gfxConfig::IsEnabled(Feature::WEBRENDER_SOFTWARE)) {
|
||||
|
|
|
@ -152,6 +152,7 @@
|
|||
#include "mozilla/StaticPrefs_layout.h"
|
||||
|
||||
#include "nsIGfxInfo.h"
|
||||
#include "nsIXULRuntime.h" // for FissionAutostart
|
||||
#include "nsUXThemeConstants.h"
|
||||
#include "KeyboardLayout.h"
|
||||
#include "nsNativeDragTarget.h"
|
||||
|
@ -8539,8 +8540,9 @@ void nsWindow::PickerClosed() {
|
|||
}
|
||||
|
||||
bool nsWindow::WidgetTypePrefersSoftwareWebRender() const {
|
||||
return (StaticPrefs::gfx_webrender_software_unaccelerated_widget_allow() &&
|
||||
mTransparencyMode == eTransparencyTransparent) ||
|
||||
return (mTransparencyMode == eTransparencyTransparent &&
|
||||
(StaticPrefs::gfx_webrender_software_unaccelerated_widget_allow() ||
|
||||
FissionAutostart())) ||
|
||||
nsBaseWidget::WidgetTypePrefersSoftwareWebRender();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче