From b7b6ee36991f4d9ac44d59d4e59718b2bd39726d Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Thu, 26 Aug 2021 14:19:13 +0000 Subject: [PATCH] Bug 1727752 - Document DIGroup and fix stale comment. r=mstange In bug 1548056 we stopped using FLB/ComputeDifferences for invalidation of filters and transform and switched to ConstructGroupInsideInactive. Differential Revision: https://phabricator.services.mozilla.com/D123760 --- gfx/layers/wr/WebRenderCommandBuilder.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/gfx/layers/wr/WebRenderCommandBuilder.cpp b/gfx/layers/wr/WebRenderCommandBuilder.cpp index 1453e3f937f8..828e16a8a6f5 100644 --- a/gfx/layers/wr/WebRenderCommandBuilder.cpp +++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp @@ -267,6 +267,10 @@ static bool DetectContainerLayerPropertiesBoundsChange( return !aGeometry.mBounds.IsEqualEdges(aData->mGeometry->mBounds); } +/* A Display Item Group. This represents a set of diplay items that + * have been grouped together for rasterization and can be partially + * invalidated. It also tracks a number of properties from the environment + * that when changed would cause us to repaint like mScale. */ struct DIGroup { // XXX: Storing owning pointers to the BlobItemData in a hash table is not // a good choice. There are two better options: @@ -1293,9 +1297,9 @@ bool Grouper::ConstructItemInsideInactive( aGroup->mClippedImageBounds.Intersect(data->mRect); if (aItem->GetType() == DisplayItemType::TYPE_FILTER) { - // 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 ConstructGroupInsideInactive 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. Matrix m = mTransform; mTransform = Matrix(); bool old = aGroup->mSuppressInvalidations; @@ -1318,9 +1322,9 @@ bool Grouper::ConstructItemInsideInactive( Matrix t2d; bool is2D = t.CanDraw2D(&t2d); if (!is2D) { - // 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 ConstructGroupInsideInactive 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. bool old = aGroup->mSuppressInvalidations; aGroup->mSuppressInvalidations = true; mTransform = Matrix();