Bug 1493616. Clear mInvalid more agressively so that we don't reuse it across paints r=mstange
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Sat, 06 Oct 2018 02:42:22 +0000
changeset 439871 497bb152e567c56bca163d258d83b4bc9087fb37
parent 439870 d4cd818673005e926f505b82eccb89b0b46045f7
child 439872 e2ec1eeb812d2a3178c303e9ba5538e0d2264bec
push id34792
push usernerli@mozilla.com
push dateSat, 06 Oct 2018 09:26:47 +0000
treeherdermozilla-central@e2ec1eeb812d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1493616
milestone64.0a1
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 1493616. Clear mInvalid more agressively so that we don't reuse it across paints r=mstange Differential Revision: https://phabricator.services.mozilla.com/D7948
gfx/layers/wr/WebRenderCommandBuilder.cpp
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -730,18 +730,16 @@ struct DIGroup
       bool dirty = true;
       if (!mInvalidRect.Contains(bounds)) {
         GP("Passing\n");
         dirty = false;
       }
 
       if (mInvalidRect.Contains(bounds)) {
         GP("Wholely contained\n");
-        BlobItemData* data = GetBlobItemData(item);
-        data->mInvalid = false;
       } 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);
@@ -1095,16 +1093,21 @@ Grouper::ConstructItemInsideInactive(Web
                                      wr::DisplayListBuilder& aBuilder,
                                      wr::IpcResourceUpdateQueue& aResources,
                                      DIGroup* aGroup, nsDisplayItem* aItem,
                                      const StackingContextHelper& aSc)
 {
   nsDisplayList* children = aItem->GetChildren();
   BlobItemData* data = GetBlobItemDataForGroup(aItem, aGroup);
 
+  /* mInvalid unfortunately persists across paints. Clear it so that if we don't
+   * set it to 'true' we ensure that we're not using the value from the last
+   * time that we painted */
+  data->mInvalid = false;
+
   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.
     data->mInvalid = BuildLayer(aItem, data, mDisplayListBuilder, scale);
   } else if (aItem->GetType() == DisplayItemType::TYPE_TRANSFORM) {
     nsDisplayTransform* transformItem = static_cast<nsDisplayTransform*>(aItem);
     const Matrix4x4Flagged& t = transformItem->GetTransform();