Bug 976877 - Don't simplify invalidation regions since it leads to poor results. r=roc
authorMatt Woodrow <mwoodrow@mozilla.com>
Sat, 01 Mar 2014 08:49:05 +1300
changeset 171330 4e0303f0aebc4a8880c97fc201575b528ec9715b
parent 171329 1b4b7d198185e3a23d4b5a52b41651289ee725b5
child 171331 3637434788e5ee9964fe8f4fb05c1d5a2008cbe7
push id26324
push useremorley@mozilla.com
push dateMon, 03 Mar 2014 14:45:05 +0000
treeherdermozilla-central@73ab6437a1de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs976877
milestone30.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 976877 - Don't simplify invalidation regions since it leads to poor results. r=roc
gfx/layers/LayerTreeInvalidation.cpp
gfx/layers/basic/BasicThebesLayer.h
gfx/layers/client/ClientThebesLayer.h
gfx/layers/d3d9/ThebesLayerD3D9.cpp
--- a/gfx/layers/LayerTreeInvalidation.cpp
+++ b/gfx/layers/LayerTreeInvalidation.cpp
@@ -54,24 +54,22 @@ TransformRect(const nsIntRect& aRect, co
 static void
 AddTransformedRegion(nsIntRegion& aDest, const nsIntRegion& aSource, const gfx3DMatrix& aTransform)
 {
   nsIntRegionRectIterator iter(aSource);
   const nsIntRect *r;
   while ((r = iter.Next())) {
     aDest.Or(aDest, TransformRect(*r, aTransform));
   }
-  aDest.SimplifyOutward(4);
 }
 
 static void
 AddRegion(nsIntRegion& aDest, const nsIntRegion& aSource)
 {
   aDest.Or(aDest, aSource);
-  aDest.SimplifyOutward(4);
 }
 
 static nsIntRegion
 TransformRegion(const nsIntRegion& aRegion, const gfx3DMatrix& aTransform)
 {
   nsIntRegion result;
   AddTransformedRegion(result, aRegion, aTransform);
   return result;
--- a/gfx/layers/basic/BasicThebesLayer.h
+++ b/gfx/layers/basic/BasicThebesLayer.h
@@ -48,17 +48,16 @@ public:
                  "Can only set properties in construction phase");
     ThebesLayer::SetVisibleRegion(aRegion);
   }
   virtual void InvalidateRegion(const nsIntRegion& aRegion)
   {
     NS_ASSERTION(BasicManager()->InConstruction(),
                  "Can only set properties in construction phase");
     mInvalidRegion.Or(mInvalidRegion, aRegion);
-    mInvalidRegion.SimplifyOutward(10);
     mValidRegion.Sub(mValidRegion, mInvalidRegion);
   }
 
   virtual void PaintThebes(gfxContext* aContext,
                            Layer* aMaskLayer,
                            LayerManager::DrawThebesLayerCallback aCallback,
                            void* aCallbackData,
                            ReadbackProcessor* aReadback);
--- a/gfx/layers/client/ClientThebesLayer.h
+++ b/gfx/layers/client/ClientThebesLayer.h
@@ -55,17 +55,16 @@ public:
                  "Can only set properties in construction phase");
     ThebesLayer::SetVisibleRegion(aRegion);
   }
   virtual void InvalidateRegion(const nsIntRegion& aRegion)
   {
     NS_ASSERTION(ClientManager()->InConstruction(),
                  "Can only set properties in construction phase");
     mInvalidRegion.Or(mInvalidRegion, aRegion);
-    mInvalidRegion.SimplifyOutward(10);
     mValidRegion.Sub(mValidRegion, mInvalidRegion);
   }
 
   virtual void RenderLayer();
 
   virtual void ClearCachedResources()
   {
     if (mContentClient) {
--- a/gfx/layers/d3d9/ThebesLayerD3D9.cpp
+++ b/gfx/layers/d3d9/ThebesLayerD3D9.cpp
@@ -47,17 +47,16 @@ ThebesLayerD3D9::~ThebesLayerD3D9()
  * figure out the optimal threshold.
  */
 #define RETENTION_THRESHOLD 16384
 
 void
 ThebesLayerD3D9::InvalidateRegion(const nsIntRegion &aRegion)
 {
   mInvalidRegion.Or(mInvalidRegion, aRegion);
-  mInvalidRegion.SimplifyOutward(10);
   mValidRegion.Sub(mValidRegion, mInvalidRegion);
 }
 
 void
 ThebesLayerD3D9::CopyRegion(IDirect3DTexture9* aSrc, const nsIntPoint &aSrcOffset,
                             IDirect3DTexture9* aDest, const nsIntPoint &aDestOffset,
                             const nsIntRegion &aCopyRegion, nsIntRegion* aValidRegion)
 {