Bug 805014 - Disable progressive tiles when a shadow target is set. r=bgirard
authorChris Lord <chrislord.net@gmail.com>
Thu, 25 Oct 2012 17:27:08 +0100
changeset 111544 6376bf9b9cc6a4dec8e9b154daa57e54213dac3a
parent 111543 0592d78779d932329b37fc1bbbf67646ca9bba9f
child 111545 6f9d1e6b22c0189e842b99855159f43493943cf1
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersbgirard
bugs805014
milestone19.0a1
Bug 805014 - Disable progressive tiles when a shadow target is set. r=bgirard The testing framework doesn't react well to paints not coming in synchronously. Disable progressive tile painting when a shadow target is set on the layer manager for now.
gfx/layers/basic/BasicLayers.h
gfx/layers/basic/BasicTiledThebesLayer.cpp
--- a/gfx/layers/basic/BasicLayers.h
+++ b/gfx/layers/basic/BasicLayers.h
@@ -149,16 +149,17 @@ public:
                                                  bool* aNeedsClipToVisibleRegion);
   already_AddRefed<gfxContext> PushGroupWithCachedSurface(gfxContext *aTarget,
                                                           gfxASurface::gfxContentType aContent);
   void PopGroupToSourceWithCachedSurface(gfxContext *aTarget, gfxContext *aPushed);
 
   virtual bool IsCompositingCheap() { return false; }
   virtual int32_t GetMaxTextureSize() const { return INT32_MAX; }
   bool CompositorMightResample() { return mCompositorMightResample; }
+  bool HasShadowTarget() { return !!mShadowTarget; }
 
 protected:
   enum TransactionPhase {
     PHASE_NONE, PHASE_CONSTRUCTION, PHASE_DRAWING, PHASE_FORWARD
   };
   TransactionPhase mPhase;
 
   // This is the main body of the PaintLayer routine which will if it has
--- a/gfx/layers/basic/BasicTiledThebesLayer.cpp
+++ b/gfx/layers/basic/BasicTiledThebesLayer.cpp
@@ -392,16 +392,17 @@ BasicTiledThebesLayer::PaintThebes(gfxCo
   for (ContainerLayer* parent = GetParent(); parent; parent = parent->GetParent()) {
     const FrameMetrics& metrics = parent->GetFrameMetrics();
     resolution.width *= metrics.mResolution.width;
     resolution.height *= metrics.mResolution.height;
   }
 
   // Only draw progressively when the resolution is unchanged.
   if (gfxPlatform::UseProgressiveTilePainting() &&
+      !BasicManager()->HasShadowTarget() &&
       mTiledBuffer.GetResolution() == resolution) {
     // Calculate the transform required to convert screen space into layer space
     gfx3DMatrix transform = GetEffectiveTransform();
     // XXX Not sure if this code for intermediate surfaces is correct.
     //     It rarely gets hit though, and shouldn't have terrible consequences
     //     even if it is wrong.
     for (ContainerLayer* parent = GetParent(); parent; parent = parent->GetParent()) {
       if (parent->UseIntermediateSurface()) {