Bug 761962: Prefer out-of-process content to omtc when they contend. r=ajuma
authorChris Jones <jones.chris.g@gmail.com>
Wed, 06 Jun 2012 12:44:52 -0700
changeset 98723 b9c7e2a573c95a2553882c576527924c11fbe6b4
parent 98722 ae4ea8ad541a484f7f01663dc3656851adfd61cf
child 98724 3b1f2455579acc95bcc9883f13084878f5b80f63
push id1729
push userlsblakk@mozilla.com
push dateMon, 16 Jul 2012 20:02:43 +0000
treeherdermozilla-aurora@f4e75e148951 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajuma
bugs761962
milestone16.0a1
Bug 761962: Prefer out-of-process content to omtc when they contend. r=ajuma
widget/xpwidgets/nsBaseWidget.cpp
--- a/widget/xpwidgets/nsBaseWidget.cpp
+++ b/widget/xpwidgets/nsBaseWidget.cpp
@@ -1324,19 +1324,28 @@ static void InitOnlyOnce()
   }
   once = false;
 
 #ifdef MOZ_X11
   // On X11 platforms only use OMTC if firefox was initalized with thread-safe 
   // X11 (else it would crash).
   sUseOffMainThreadCompositing = (PR_GetEnv("MOZ_USE_OMTC") != NULL);
 #else
-  sUseOffMainThreadCompositing = mozilla::Preferences::GetBool(
+  sUseOffMainThreadCompositing = Preferences::GetBool(
         "layers.offmainthreadcomposition.enabled", 
         false);
+  // Until https://bugzilla.mozilla.org/show_bug.cgi?id=745148 lands,
+  // we use either omtc or content processes, but not both.  Prefer
+  // OOP content to omtc.  (Currently, this only affects b2g.)
+  //
+  // See https://bugzilla.mozilla.org/show_bug.cgi?id=761962 .
+  if (!Preferences::GetBool("dom.ipc.tabs.disabled", true)) {
+    // Disable omtc if OOP content isn't force-disabled.
+    sUseOffMainThreadCompositing = false;
+  }
 #endif
 }
 
 #ifdef DEBUG
 //////////////////////////////////////////////////////////////
 //
 // Convert a GUI event message code to a string.
 // Makes it a lot easier to debug events.