diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index ddb50f13d8f4..130f859ff694 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -2505,6 +2505,12 @@ gfxPlatform::InitOpenGLConfig() if (!IsGfxInfoStatusOkay(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &message, failureId)) { openGLFeature.Disable(FeatureStatus::Blacklisted, message.get(), failureId); } + + // Ensure that an accelerated compositor backend is available when layers + // acceleration is force-enabled. + if (gfxPrefs::LayersAccelerationForceEnabledDoNotUseDirectly()) { + openGLFeature.UserForceEnable("Force-enabled by pref"); + } } bool