Disable the GPU process when LayerScope is enabled. (bug 1316429, r=milan)
authorDavid Anderson <danderson@mozilla.com>
Thu, 10 Nov 2016 10:55:32 -0800
changeset 367170 d44dd677f3694ced59a7382fc3635eb768f95e3a
parent 367169 ff60dd49591d9b7949799628d259b4474ee97549
child 367171 ab22fdf8dad77191d439b827b87bb2e16ae815a3
push id1369
push userjlorenzo@mozilla.com
push dateMon, 27 Feb 2017 14:59:41 +0000
treeherdermozilla-release@d75a1dba431f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmilan
bugs1316429
milestone52.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
Disable the GPU process when LayerScope is enabled. (bug 1316429, r=milan)
gfx/layers/LayerScope.cpp
gfx/thebes/gfxPlatform.cpp
--- a/gfx/layers/LayerScope.cpp
+++ b/gfx/layers/LayerScope.cpp
@@ -1624,17 +1624,17 @@ NS_IMETHODIMP LayerScopeWebSocketManager
 
 // ----------------------------------------------
 // LayerScope implementation
 // ----------------------------------------------
 /*static*/
 void
 LayerScope::Init()
 {
-    if (!gfxPrefs::LayerScopeEnabled()) {
+    if (!gfxPrefs::LayerScopeEnabled() || XRE_IsGPUProcess()) {
         return;
     }
 
     gLayerScopeManager.CreateServerSocket();
 }
 
 /*static*/
 void
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2195,16 +2195,23 @@ gfxPlatform::InitGPUProcessPrefs()
   }
   if (InSafeMode()) {
     gpuProc.ForceDisable(
       FeatureStatus::Blocked,
       "Safe-mode is enabled",
       NS_LITERAL_CSTRING("FEATURE_FAILURE_SAFE_MODE"));
     return;
   }
+  if (gfxPrefs::LayerScopeEnabled()) {
+    gpuProc.ForceDisable(
+      FeatureStatus::Blocked,
+      "LayerScope does not work in the GPU process",
+      NS_LITERAL_CSTRING("FEATURE_FAILURE_LAYERSCOPE"));
+    return;
+  }
 }
 
 void
 gfxPlatform::InitCompositorAccelerationPrefs()
 {
   const char *acceleratedEnv = PR_GetEnv("MOZ_ACCELERATED");
 
   FeatureState& feature = gfxConfig::GetFeature(Feature::HW_COMPOSITING);