Bug 896250: Return the max number, not the flag checking if the number was set. r=joe
☠☠ backed out by 46d73e889cb4 ☠ ☠
authorMilan Sreckovic <milan@mozilla.com>
Mon, 22 Jul 2013 17:05:21 -0400
changeset 139996 da5fa63e90cb5bea5d71b5f964b61a27ea642e2e
parent 139995 91fd82928532ef53b837429bcdd0d864a1ce80c1
child 139997 4f35e943f9391fa0cfddede8d283093358c859f4
push id25010
push userryanvm@gmail.com
push dateFri, 26 Jul 2013 01:56:45 +0000
treeherdermozilla-central@5a60a08e6899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe
bugs896250
milestone25.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 896250: Return the max number, not the flag checking if the number was set. r=joe
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -1495,25 +1495,25 @@ nsDisplayItem::ForceActiveLayers()
   }
 
   return sForce;
 }
 
 /* static */ int32_t
 nsDisplayItem::MaxActiveLayers()
 {
-  static int32_t sMaxLayers = false;
+  static int32_t sMaxLayers = -1;
   static bool sMaxLayersCached = false;
 
   if (!sMaxLayersCached) {
     Preferences::AddIntVarCache(&sMaxLayers, "layers.max-active", -1);
     sMaxLayersCached = true;
   }
 
-  return sMaxLayersCached;
+  return sMaxLayers;
 }
 
 bool
 nsDisplayItem::RecomputeVisibility(nsDisplayListBuilder* aBuilder,
                                    nsRegion* aVisibleRegion) {
   nsRect bounds = GetClippedBounds(aBuilder);
 
   nsRegion itemVisible;