Bug 1292326 - Let layers.acceleration.force-enabled apply to the OPENGL_COMPOSITING feature. r?jrmuizel draft
authorAndrew Comminos <andrew@comminos.com>
Thu, 04 Aug 2016 16:15:20 -0400
changeset 396855 782e0e3715cafbb74375a903045b6b781fec9e28
parent 396854 11277bdf73134ed44dcfb3179da61c2f3c46ba7f
child 527316 7a081131478e91d4cbc1f98f6e3b3290fc0520d9
push id25137
push userbmo:andrew@comminos.com
push dateThu, 04 Aug 2016 20:20:38 +0000
reviewersjrmuizel
bugs1292326
milestone51.0a1
Bug 1292326 - Let layers.acceleration.force-enabled apply to the OPENGL_COMPOSITING feature. r?jrmuizel MozReview-Commit-ID: 2Lx4CVOao6S
gfx/thebes/gfxPlatform.cpp
--- 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;