Bug 1022612. Part 13: Set mDidComputeVisibility in ProcessDisplayItems. r=mattwoodrow
authorRobert O'Callahan <robert@ocallahan.org>
Mon, 07 Jul 2014 17:46:28 +1200
changeset 217058 d674b220a1807a090181e1dc8b3c35565dd2ed18
parent 217057 bb02e31b35a988f1feec2fcd97af4ea8d34c8876
child 217059 054fe93eeb875c591af98dfbfe8bc81d98cea015
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1022612
milestone33.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 1022612. Part 13: Set mDidComputeVisibility in ProcessDisplayItems. r=mattwoodrow
layout/base/FrameLayerBuilder.cpp
layout/base/nsDisplayList.h
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -2745,16 +2745,17 @@ ContainerState::ProcessDisplayItems(nsDi
 
     if (itemSameCoordinateSystemChildren &&
         itemSameCoordinateSystemChildren->NeedsTransparentSurface()) {
       aList->SetNeedsTransparentSurface();
     }
   }
 
   aList->AppendToTop(&savedItems);
+  aList->SetDidComputeVisibility();
 }
 
 void
 ContainerState::InvalidateForLayerChange(nsDisplayItem* aItem,
                                          Layer* aNewLayer,
                                          const DisplayItemClip& aClip,
                                          const nsPoint& aTopLeft,
                                          nsDisplayItemGeometry *aGeometry)
--- a/layout/base/nsDisplayList.h
+++ b/layout/base/nsDisplayList.h
@@ -1699,20 +1699,31 @@ public:
   void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
                nsDisplayItem::HitTestState* aState,
                nsTArray<nsIFrame*> *aOutFrames) const;
 
 #if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
   bool DidComputeVisibility() const { return mDidComputeVisibility; }
 #endif
 
+  void SetDidComputeVisibility()
+  {
+#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
+    mDidComputeVisibility = true;
+#endif
+  }
   void SetIsOpaque()
   {
     mIsOpaque = true;
   }
+  void SetNeedsTransparentSurface()
+  {
+    mForceTransparentSurface = true;
+  }
+
   nsRect GetVisibleRect() const { return mVisibleRect; }
 
 private:
   // This class is only used on stack, so we don't have to worry about leaking
   // it.  Don't let us be heap-allocated!
   void* operator new(size_t sz) CPP_THROW_NEW;
   
   // Utility function used to massage the list during ComputeVisibility.