Bug 1292326 - Let layers.acceleration.force-enabled apply to the OPENGL_COMPOSITING feature. r?jrmuizel
MozReview-Commit-ID: 2Lx4CVOao6S
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2500,16 +2500,22 @@ gfxPlatform::InitOpenGLConfig()
openGLFeature.EnableByDefault();
#endif
nsCString message;
nsCString failureId;
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
gfxPlatform::IsGfxInfoStatusOkay(int32_t aFeature, nsCString* aOutMessage, nsCString& aFailureId)
{
nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
if (!gfxInfo) {
return true;