Bug 1292326 - Let layers.acceleration.force-enabled apply to the OPENGL_COMPOSITING feature. r=jrmuizel
authorAndrew Comminos <andrew@comminos.com>
Thu, 04 Aug 2016 16:15:20 -0400
changeset 308184 be5163e05d753f603e53a3a0c05b1b621aab31df
parent 308183 8668f02b42d2238082548345ed73681c7e174e77
child 308185 3bf9c257e4bd239f80dd8deb6a6e8832c66f31bb
push id30529
push usercbook@mozilla.com
push dateFri, 05 Aug 2016 09:59:25 +0000
treeherdermozilla-central@0f1333d8cf91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1292326
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;