Bug 637852. Part 1: Don't snap BasicThebesLayer effective transforms when we're not retaining layers. r=tnikkel
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 23 Jun 2011 00:11:27 +1200
changeset 71516 7853e5cf72f7700cfe63e4c9e25315800e2fb52d
parent 71513 ff8bd5d40a57621efc07de0ddcd46e155e63ad4b
child 71517 c9dd59391c7d104e4d9faa863b3cbf655f562a41
push id20559
push usereakhgari@mozilla.com
push dateWed, 22 Jun 2011 19:51:00 +0000
treeherdermozilla-central@cd95d565c4d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs637852
milestone7.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 637852. Part 1: Don't snap BasicThebesLayer effective transforms when we're not retaining layers. r=tnikkel The ThebesLayer contents are going to be drawn through directly without retaining, so there's no point in snapping.
gfx/layers/basic/BasicLayers.cpp
--- a/gfx/layers/basic/BasicLayers.cpp
+++ b/gfx/layers/basic/BasicLayers.cpp
@@ -495,16 +495,27 @@ public:
           referenceSurface = BasicManager()->GetTarget()->CurrentSurface();
         }
       }
     }
     return referenceSurface->CreateSimilarSurface(
       aType, gfxIntSize(aSize.width, aSize.height));
   }
 
+  virtual void ComputeEffectiveTransforms(const gfx3DMatrix& aTransformToSurface)
+  {
+    if (!BasicManager()->IsRetained()) {
+      // Don't do any snapping of our transform, since we're just going to
+      // draw straight through without intermediate buffers.
+      mEffectiveTransform = GetLocalTransform()*aTransformToSurface;
+      return;
+    }
+    ThebesLayer::ComputeEffectiveTransforms(aTransformToSurface);
+  }
+
 protected:
   BasicLayerManager* BasicManager()
   {
     return static_cast<BasicLayerManager*>(mManager);
   }
 
   virtual void
   PaintBuffer(gfxContext* aContext,