Backed out 2 changesets (bug 1494062) for failing at /tests/gfx/tests/crashtests/1494062.html on a CLOSED TREE
authorGurzau Raul <rgurzau@mozilla.com>
Thu, 17 Jan 2019 23:07:36 +0200
changeset 511499 8ae1a19800b4018ab6526242bc83c365216df579
parent 511498 50f859a240370db9ab237aa3ac4a3341e904a019
child 511500 c39aa6dfd458fdf59e8b8791357b7d79fb8f5d6f
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1494062
milestone66.0a1
backs out50f859a240370db9ab237aa3ac4a3341e904a019
23b890a3fc7876e64d24827246bc981b0223655e
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
Backed out 2 changesets (bug 1494062) for failing at /tests/gfx/tests/crashtests/1494062.html on a CLOSED TREE Backed out changeset 50f859a24037 (bug 1494062) Backed out changeset 23b890a3fc78 (bug 1494062)
gfx/layers/wr/WebRenderCommandBuilder.cpp
gfx/tests/crashtests/1494062-blob-image-wraplist-clip.html
gfx/tests/crashtests/crashtests.list
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -319,19 +319,16 @@ struct DIGroup {
   int32_t mAppUnitsPerDevPixel;
   gfx::Size mScale;
   ScrollableLayerGuid::ViewID mScrollId;
   LayerPoint mResidualOffset;
   LayerIntRect mLayerBounds;
   // The current bounds of the blob image, relative to
   // the top-left of the mLayerBounds.
   IntRect mImageBounds;
-  // mImageBounds clipped to the container/parent of the
-  // current item being processed.
-  IntRect mClippedImageBounds;
   Maybe<wr::BlobImageKey> mKey;
   std::vector<RefPtr<SourceSurface>> mExternalSurfaces;
   std::vector<RefPtr<ScaledFont>> mFonts;
 
   DIGroup()
       : mAppUnitsPerDevPixel(0),
         mScrollId(ScrollableLayerGuid::NULL_SCROLL_ID) {}
 
@@ -389,19 +386,18 @@ struct DIGroup {
     int32_t appUnitsPerDevPixel =
         aItem->Frame()->PresContext()->AppUnitsPerDevPixel();
     MOZ_RELEASE_ASSERT(mAppUnitsPerDevPixel == appUnitsPerDevPixel);
     LayoutDeviceRect bounds =
         LayoutDeviceRect::FromAppUnits(mGroupBounds, appUnitsPerDevPixel);
     LayoutDeviceIntPoint offset = RoundedToInt(bounds.TopLeft());
     GP("\n");
     GP("CGC offset %d %d\n", offset.x, offset.y);
-    GP("clippedImageRect %d %d %d %d\n", mClippedImageBounds.x,
-       mClippedImageBounds.y, mClippedImageBounds.width,
-       mClippedImageBounds.height);
+    GP("imageRect %d %d %d %d\n", mImageBounds.x, mImageBounds.y,
+       mImageBounds.width, mImageBounds.height);
     /*if (aItem->IsReused() && aData->mGeometry) {
       return;
     }*/
     aData->mInvalidRegion = false;
 
     GP("pre mInvalidRect: %s %p-%d - inv: %d %d %d %d\n", aItem->Name(),
        aItem->Frame(), aItem->GetPerFrameKey(), mInvalidRect.x, mInvalidRect.y,
        mInvalidRect.width, mInvalidRect.height);
@@ -412,17 +408,17 @@ struct DIGroup {
           aItem->AllocateGeometry(aBuilder));
       nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
           geometry->ComputeInvalidationRegion());
       aData->mGeometry = std::move(geometry);
 
       IntRect transformedRect =
           ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
                         mLayerBounds.TopLeft());
-      aData->mRect = transformedRect.Intersect(mClippedImageBounds);
+      aData->mRect = transformedRect.Intersect(mImageBounds);
       GP("CGC %s %d %d %d %d\n", aItem->Name(), clippedBounds.x,
          clippedBounds.y, clippedBounds.width, clippedBounds.height);
       GP("%d %d,  %f %f\n", mLayerBounds.TopLeft().x, mLayerBounds.TopLeft().y,
          aMatrix._11, aMatrix._22);
       GP("mRect %d %d %d %d\n", aData->mRect.x, aData->mRect.y,
          aData->mRect.width, aData->mRect.height);
       InvalidateRect(aData->mRect);
       aData->mInvalid = true;
@@ -443,17 +439,17 @@ struct DIGroup {
       InvalidateRect(aData->mRect.Intersect(mImageBounds));
       // We want to snap to outside pixels. When should we multiply by the
       // matrix?
       // XXX: TransformBounds is expensive. We should avoid doing it if we have
       // no transform
       IntRect transformedRect =
           ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
                         mLayerBounds.TopLeft());
-      aData->mRect = transformedRect.Intersect(mClippedImageBounds);
+      aData->mRect = transformedRect.Intersect(mImageBounds);
       InvalidateRect(aData->mRect);
       GP("new rect: %d %d %d %d\n", aData->mRect.x, aData->mRect.y,
          aData->mRect.width, aData->mRect.height);
       aData->mInvalid = true;
     } else {
       MOZ_RELEASE_ASSERT(mLayerBounds.TopLeft() == aData->mGroupOffset);
       GP("else invalidate: %s\n", aItem->Name());
       nsRegion combined;
@@ -472,17 +468,17 @@ struct DIGroup {
 
         aData->mGeometry = std::move(geometry);
 
         nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
             aData->mGeometry->ComputeInvalidationRegion());
         IntRect transformedRect =
             ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
                           mLayerBounds.TopLeft());
-        aData->mRect = transformedRect.Intersect(mClippedImageBounds);
+        aData->mRect = transformedRect.Intersect(mImageBounds);
         InvalidateRect(aData->mRect);
 
         // CGC invariant broken
         if (!mInvalidRect.Contains(aData->mRect)) {
           gfxCriticalError()
               << "CGC-"
               << "-" << aData->mRect.x << "-" << aData->mRect.y << "-"
               << aData->mRect.width << "-" << aData->mRect.height << "-ib";
@@ -504,17 +500,17 @@ struct DIGroup {
             aData->mGeometry = std::move(geometry);
           }
           nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
               aData->mGeometry->ComputeInvalidationRegion());
           IntRect transformedRect =
               ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
                             mLayerBounds.TopLeft());
           InvalidateRect(aData->mRect.Intersect(mImageBounds));
-          aData->mRect = transformedRect.Intersect(mClippedImageBounds);
+          aData->mRect = transformedRect.Intersect(mImageBounds);
           InvalidateRect(aData->mRect);
 
           GP("ClipChange: %s %d %d %d %d\n", aItem->Name(), aData->mRect.x,
              aData->mRect.y, aData->mRect.XMost(), aData->mRect.YMost());
 
         } else if (!aMatrix.ExactlyEquals(aData->mMatrix)) {
           // We haven't detected any changes so far. Unfortunately we don't
           // currently have a good way of checking if the transform has changed
@@ -534,17 +530,17 @@ struct DIGroup {
             aData->mGeometry = std::move(geometry);
           }
           nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
               aData->mGeometry->ComputeInvalidationRegion());
           IntRect transformedRect =
               ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
                             mLayerBounds.TopLeft());
           InvalidateRect(aData->mRect.Intersect(mImageBounds));
-          aData->mRect = transformedRect.Intersect(mClippedImageBounds);
+          aData->mRect = transformedRect.Intersect(mImageBounds);
           InvalidateRect(aData->mRect);
 
           GP("TransformChange: %s %d %d %d %d\n", aItem->Name(), aData->mRect.x,
              aData->mRect.y, aData->mRect.XMost(), aData->mRect.YMost());
         } else if (IsContainerLayerItem(aItem)) {
           UniquePtr<nsDisplayItemGeometry> geometry(
               aItem->AllocateGeometry(aBuilder));
           // we need to catch bounds changes of containers so that we continue
@@ -553,80 +549,80 @@ struct DIGroup {
                                                             *geometry)) {
             nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
                 geometry->ComputeInvalidationRegion());
             aData->mGeometry = std::move(geometry);
             IntRect transformedRect =
                 ToDeviceSpace(clippedBounds, aMatrix,
                               appUnitsPerDevPixel, mLayerBounds.TopLeft());
             InvalidateRect(aData->mRect.Intersect(mImageBounds));
-            aData->mRect = transformedRect.Intersect(mClippedImageBounds);
+            aData->mRect = transformedRect.Intersect(mImageBounds);
             InvalidateRect(aData->mRect);
             GP("UpdateContainerLayerPropertiesAndDetectChange change\n");
-          } else if (!aData->mImageRect.IsEqualEdges(mClippedImageBounds)) {
-            // Make sure we update mRect for mClippedImageBounds changes
+          } else if (!aData->mImageRect.IsEqualEdges(mImageBounds)) {
+            // Make sure we update mRect for mImageBounds changes
             nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
                 geometry->ComputeInvalidationRegion());
             IntRect transformedRect =
                 ToDeviceSpace(clippedBounds, aMatrix,
                               appUnitsPerDevPixel, mLayerBounds.TopLeft());
             // The invalid rect should contain the old rect and the new rect
             // but may not because the parent may have been removed.
             InvalidateRect(aData->mRect);
-            aData->mRect = transformedRect.Intersect(mClippedImageBounds);
+            aData->mRect = transformedRect.Intersect(mImageBounds);
             InvalidateRect(aData->mRect);
             GP("ContainerLayer image rect bounds change\n");
           } else {
             // XXX: this code can eventually be deleted/made debug only
             nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
                 geometry->ComputeInvalidationRegion());
             IntRect transformedRect =
                 ToDeviceSpace(clippedBounds, aMatrix,
                               appUnitsPerDevPixel, mLayerBounds.TopLeft());
-            auto rect = transformedRect.Intersect(mClippedImageBounds);
+            auto rect = transformedRect.Intersect(mImageBounds);
             GP("Layer NoChange: %s %d %d %d %d\n", aItem->Name(),
                aData->mRect.x, aData->mRect.y, aData->mRect.XMost(),
                aData->mRect.YMost());
             MOZ_RELEASE_ASSERT(rect.IsEqualEdges(aData->mRect));
           }
-        } else if (!aData->mImageRect.IsEqualEdges(mClippedImageBounds)) {
-          // Make sure we update mRect for mClippedImageBounds changes
+        } else if (!aData->mImageRect.IsEqualEdges(mImageBounds)) {
+          // Make sure we update mRect for mImageBounds changes
           UniquePtr<nsDisplayItemGeometry> geometry(
               aItem->AllocateGeometry(aBuilder));
           nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
               geometry->ComputeInvalidationRegion());
           IntRect transformedRect =
               ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
                             mLayerBounds.TopLeft());
           // The invalid rect should contain the old rect and the new rect
           // but may not because the parent may have been removed.
           InvalidateRect(aData->mRect);
-          aData->mRect = transformedRect.Intersect(mClippedImageBounds);
+          aData->mRect = transformedRect.Intersect(mImageBounds);
           InvalidateRect(aData->mRect);
           GP("image rect bounds change\n");
         } else {
           // XXX: this code can eventually be deleted/made debug only
           UniquePtr<nsDisplayItemGeometry> geometry(
               aItem->AllocateGeometry(aBuilder));
           nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
               geometry->ComputeInvalidationRegion());
           IntRect transformedRect =
               ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
                             mLayerBounds.TopLeft());
-          auto rect = transformedRect.Intersect(mClippedImageBounds);
+          auto rect = transformedRect.Intersect(mImageBounds);
           GP("NoChange: %s %d %d %d %d\n", aItem->Name(), aData->mRect.x,
              aData->mRect.y, aData->mRect.XMost(), aData->mRect.YMost());
           MOZ_RELEASE_ASSERT(rect.IsEqualEdges(aData->mRect));
         }
       }
     }
     aData->mClip = clip;
     aData->mMatrix = aMatrix;
     aData->mGroupOffset = mLayerBounds.TopLeft();
-    aData->mImageRect = mClippedImageBounds;
+    aData->mImageRect = mImageBounds;
     GP("post mInvalidRect: %d %d %d %d\n", mInvalidRect.x, mInvalidRect.y,
        mInvalidRect.width, mInvalidRect.height);
   }
 
   void EndGroup(WebRenderLayerManager* aWrManager,
                 nsDisplayListBuilder* aDisplayListBuilder,
                 wr::DisplayListBuilder& aBuilder,
                 wr::IpcResourceUpdateQueue& aResources, Grouper* aGrouper,
@@ -1163,18 +1159,16 @@ void Grouper::ConstructGroups(nsDisplayL
         groupData->mFollowingGroup.ClearImageKey(
             aCommandBuilder->mManager->GetRenderRootStateManager());
       }
       groupData->mFollowingGroup.mGroupBounds = currentGroup->mGroupBounds;
       groupData->mFollowingGroup.mAppUnitsPerDevPixel =
           currentGroup->mAppUnitsPerDevPixel;
       groupData->mFollowingGroup.mLayerBounds = currentGroup->mLayerBounds;
       groupData->mFollowingGroup.mImageBounds = currentGroup->mImageBounds;
-      groupData->mFollowingGroup.mClippedImageBounds =
-          currentGroup->mClippedImageBounds;
       groupData->mFollowingGroup.mScale = currentGroup->mScale;
       groupData->mFollowingGroup.mResidualOffset =
           currentGroup->mResidualOffset;
       groupData->mFollowingGroup.mPaintRect = currentGroup->mPaintRect;
 
       currentGroup = &groupData->mFollowingGroup;
 
       startOfCurrentGroup = item->GetAbove();
@@ -1222,19 +1216,18 @@ void Grouper::ConstructItemInsideInactiv
   data->mInvalid = false;
 
   // we compute the geometry change here because we have the transform around
   // still
   aGroup->ComputeGeometryChange(aItem, data, mTransform, mDisplayListBuilder);
 
   // Temporarily restrict the image bounds to the bounds of the container so
   // that clipped children within the container know about the clip.
-  IntRect oldClippedImageBounds = aGroup->mClippedImageBounds;
-  aGroup->mClippedImageBounds =
-      aGroup->mClippedImageBounds.Intersect(data->mRect);
+  IntRect oldImageBounds = aGroup->mImageBounds;
+  aGroup->mImageBounds = aGroup->mImageBounds.Intersect(data->mRect);
 
   if (aItem->GetType() == DisplayItemType::TYPE_FILTER) {
     gfx::Size scale(1, 1);
     // If ComputeDifferences finds any change, we invalidate the entire
     // container item. This is needed because blob merging requires the entire
     // item to be within the invalid region.
     if (BuildLayer(aItem, data, mDisplayListBuilder, scale)) {
       data->mInvalid = true;
@@ -1269,17 +1262,17 @@ void Grouper::ConstructItemInsideInactiv
   } else if (children) {
     sIndent++;
     ConstructGroupInsideInactive(aCommandBuilder, aBuilder, aResources, aGroup,
                                  children, aSc);
     sIndent--;
   }
 
   GP("Including %s of %d\n", aItem->Name(), aGroup->mDisplayItems.Count());
-  aGroup->mClippedImageBounds = oldClippedImageBounds;
+  aGroup->mImageBounds = oldImageBounds;
 }
 
 /* This is just a copy of nsRect::ScaleToOutsidePixels with an offset added in.
  * The offset is applied just before the rounding. It's in the scaled space. */
 static mozilla::gfx::IntRect ScaleToOutsidePixelsOffset(
     nsRect aRect, float aXScale, float aYScale, nscoord aAppUnitsPerPixel,
     LayerPoint aOffset) {
   mozilla::gfx::IntRect rect;
@@ -1377,17 +1370,16 @@ void WebRenderCommandBuilder::DoGrouping
   group.mResidualOffset = residualOffset;
   group.mGroupBounds = groupBounds;
   group.mAppUnitsPerDevPixel = appUnitsPerDevPixel;
   group.mLayerBounds = LayerIntRect::FromUnknownRect(
       ScaleToOutsidePixelsOffset(group.mGroupBounds, scale.width, scale.height,
                                  group.mAppUnitsPerDevPixel, residualOffset));
   group.mImageBounds =
       IntRect(0, 0, group.mLayerBounds.width, group.mLayerBounds.height);
-  group.mClippedImageBounds = group.mImageBounds;
   group.mPaintRect =
       LayerIntRect::FromUnknownRect(
           ScaleToOutsidePixelsOffset(aWrappingItem->GetPaintRect(), scale.width,
                                      scale.height, group.mAppUnitsPerDevPixel,
                                      residualOffset))
           .Intersect(group.mLayerBounds);
   // XXX: Make the paint rect relative to the layer bounds. After we include
   // mLayerBounds.TopLeft() in the blob image we want to stop doing this
deleted file mode 100644
--- a/gfx/tests/crashtests/1494062-blob-image-wraplist-clip.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<html class="reftest-wait">
-<head>
-<script type="text/javascript">
-window.addEventListener("MozReftestInvalidate", function() {
-  window.requestAnimationFrame(function() {
-    var xmlns = "http://www.w3.org/2000/svg";
-    var circleElm = document.getElementById("green_circle");
-    circleElm.setAttribute("clip-path", "url(#quarter)");
-    window.requestAnimationFrame(function() {
-      document.documentElement.removeAttribute('class');
-    });
-  });
-});
-</script>
-</head>
-<body>
-<svg width="200" height="200" id="root">
-<defs>
-<clipPath id="quarter">
-<rect x="0" y="0" width="50" height="50"/>
-</clipPath>
-</defs>
-<circle cx="50" cy="50" r="40" fill="green" id="green_circle"/>
-<rect x="150" y="150" width="10" height="10" fill="red"/>
-</svg>
-</body>
-</html>
--- a/gfx/tests/crashtests/crashtests.list
+++ b/gfx/tests/crashtests/crashtests.list
@@ -176,10 +176,9 @@ load 1503986-1.html
 load 1505426-1.html
 load 1508811.html
 load 1508822.html
 load 1509099.html
 load 1513133.html
 load 1496194.html
 load 1505934-1.html
 load 1509123.html
-load 1494062.html
 load texture-allocator-zero-region.html