Temporary workaround for bug 681192 and bug 724786 (subpixel layer invalidation). Remove me later.
authorPatrick Walton <pwalton@mozilla.com>
Tue, 07 Feb 2012 22:21:38 -0800
changeset 90899 45e4d21b5ce93ba42e7b1ba13f95b580a0a22b0c
parent 90898 bfa7372a8ed01fc87680661638ad2c534276a987
child 90900 8e9ea157c3f7f6c81d115f2ccc64ed9f512d0b10
push idunknown
push userunknown
push dateunknown
bugs681192, 724786
Temporary workaround for bug 681192 and bug 724786 (subpixel layer invalidation). Remove me later.
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -866,27 +866,30 @@ ContainerState::CreateOrRecycleThebesLay
   gfxPoint scaledOffset(
       NSAppUnitsToDoublePixels(offset.x, appUnitsPerDevPixel)*mParameters.mXScale,
       NSAppUnitsToDoublePixels(offset.y, appUnitsPerDevPixel)*mParameters.mYScale);
   nsIntPoint pixOffset(NSToIntRoundUp(scaledOffset.x), NSToIntRoundUp(scaledOffset.y));
   gfxMatrix matrix;
   matrix.Translate(gfxPoint(pixOffset.x, pixOffset.y));
+   // FIXME: Temporary workaround for bug 681192 and bug 724786. Uncomment this code before review!
+#if 0
   // Calculate exact position of the top-left of the active scrolled root.
   // This might not be 0,0 due to the snapping in ScaleToNearestPixels.
   gfxPoint activeScrolledRootTopLeft = scaledOffset - matrix.GetTranslation();
   // If it has changed, then we need to invalidate the entire layer since the
   // pixels in the layer buffer have the content at a (subpixel) offset
   // from what we need.
   if (activeScrolledRootTopLeft != data->mActiveScrolledRootPosition) {
     data->mActiveScrolledRootPosition = activeScrolledRootTopLeft;
     nsIntRect invalidate = layer->GetValidRegion().GetBounds();
   return layer.forget();
  * Returns the appunits per dev pixel for the item's frame. The item must
  * have a frame because only nsDisplayClip items don't have a frame,
  * and those items are flattened away by ProcessDisplayItems.