Bug 1493616. blob-inval: Log the some more data about the broken situation.
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Sun, 07 Oct 2018 13:11:26 -0400
changeset 439930 b3158d143d833ec52c938e5235c1f86409fb764b
parent 439929 db73000c424ba29b41f6f5438ce6a389b4e529ef
child 439931 25abcd86698efbc460d097fa682d15a56c29b0f8
child 439939 3af0f8d207a2efe6537c8fbd2f9b15bdda05d914
push id108709
push userjmuizelaar@mozilla.com
push dateSun, 07 Oct 2018 17:15:14 +0000
treeherdermozilla-inbound@b3158d143d83 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1493616
milestone64.0a1
first release with
nightly linux32
b3158d143d83 / 64.0a1 / 20181007220217 / files
nightly linux64
b3158d143d83 / 64.0a1 / 20181007220217 / files
nightly mac
b3158d143d83 / 64.0a1 / 20181007220217 / files
nightly win32
b3158d143d83 / 64.0a1 / 20181007220217 / files
nightly win64
b3158d143d83 / 64.0a1 / 20181007220217 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1493616. blob-inval: Log the some more data about the broken situation.
gfx/layers/wr/WebRenderCommandBuilder.cpp
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -486,16 +486,30 @@ struct DIGroup
         InvalidateRect(invalidRect);
 
         aData->mGeometry = std::move(geometry);
 
         combined = clip.ApplyNonRoundedIntersection(aData->mGeometry->ComputeInvalidationRegion());
         transformedRect = ToDeviceSpace(combined.GetBounds(), aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
         aData->mRect = transformedRect.Intersect(imageRect);
 
+        // CGC invariant broken
+        if (!mInvalidRect.Contains(aData->mRect)) {
+          gfxCriticalError() << "CGC-" <<
+            "-" << aData->mRect.x <<
+            "-" << aData->mRect.y <<
+            "-" << aData->mRect.width <<
+            "-" << aData->mRect.height <<
+            "," << invalidRect.x <<
+            "-" << invalidRect.y <<
+            "-" << invalidRect.width <<
+            "-" << invalidRect.height <<
+            "-ib";
+        }
+
         aData->mInvalid = true;
         aData->mInvalidRegion = true;
       } else {
         if (aData->mClip != clip) {
           UniquePtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(aBuilder));
           if (!IsContainerLayerItem(aItem)) {
             // the bounds of layer items can change on us without ComputeInvalidationRegion
             // returning any change. Other items shouldn't have any hidden
@@ -742,17 +756,26 @@ struct DIGroup
       } else {
         BlobItemData* data = GetBlobItemData(item);
         if (data->mInvalid) {
           if (item->GetType() == DisplayItemType::TYPE_TRANSFORM) {
             nsDisplayTransform* transformItem = static_cast<nsDisplayTransform*>(item);
             const Matrix4x4Flagged& t = transformItem->GetTransform();
             Matrix t2d;
             bool is2D = t.Is2D(&t2d);
-            gfxCriticalError() << "DisplayItemTransform-" << is2D << "-region-" << data->mInvalidRegion << "-should-be-invalid";
+            gfxCriticalError() << "DIT-" << is2D << "-r-" << data->mInvalidRegion <<
+              "-" << bounds.x <<
+              "-" << bounds.y <<
+              "-" << bounds.width <<
+              "-" << bounds.height <<
+              "," << mInvalidRect.x <<
+              "-" << mInvalidRect.y <<
+              "-" << mInvalidRect.width <<
+              "-" << mInvalidRect.height <<
+              "-sbi";
           } else {
             gfxCriticalError() << "DisplayItem" << item->Name() << "-region-" << data->mInvalidRegion << "-should be invalid";
           }
         }
         // if the item is invalid it needs to be fully contained
         MOZ_RELEASE_ASSERT(!data->mInvalid);
       }