Bug 564991. Part 32: Fix assertion in BasicThebesLayer; it's entirely possible that we need to invalidate an area, but the actual visible region is empty so there's no context to draw to. r=cjones
authorRobert O'Callahan <robert@ocallahan.org>
Fri, 16 Jul 2010 09:08:10 +1200
changeset 47765 fa2e4fe69310b212b5c651cba35656e26549fb55
parent 47764 c117f649feed14637666c5dbcfcba18c790b5817
child 47766 7ca67c5abe054ec8a68c38bf00583b75376a5e57
push id14413
push userrocallahan@mozilla.com
push dateThu, 15 Jul 2010 21:12:02 +0000
treeherderautoland@e1d7fd5255fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs564991
milestone2.0b2pre
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 564991. Part 32: Fix assertion in BasicThebesLayer; it's entirely possible that we need to invalidate an area, but the actual visible region is empty so there's no context to draw to. r=cjones
gfx/layers/basic/BasicLayers.cpp
--- a/gfx/layers/basic/BasicLayers.cpp
+++ b/gfx/layers/basic/BasicLayers.cpp
@@ -332,18 +332,19 @@ BasicThebesLayer::Paint(gfxContext* aCon
       // (this could be the whole visible area if our buffer switched
       // from RGB to RGBA, because we might need to repaint with
       // subpixel AA)
       state.mRegionToInvalidate.And(state.mRegionToInvalidate, mVisibleRegion);
       aCallback(this, state.mContext, state.mRegionToDraw,
                 state.mRegionToInvalidate, aCallbackData);
       mValidRegion.Or(mValidRegion, state.mRegionToDraw);
     } else {
-      NS_ASSERTION(state.mRegionToDraw.IsEmpty() &&
-                   state.mRegionToInvalidate.IsEmpty(),
+      // It's possible that state.mRegionToInvalidate is nonempty here,
+      // if we are shrinking the valid region to nothing.
+      NS_ASSERTION(state.mRegionToDraw.IsEmpty(),
                    "If we need to draw, we should have a context");
     }
   }
 
   mBuffer.DrawTo(this, flags, target, aOpacity);
 }
 
 class BasicImageLayer : public ImageLayer, BasicImplData {