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
This commit is contained in:
Jeff Muizelaar 2021-08-26 14:19:13 +00:00
Родитель 4f748cc16b
Коммит b7b6ee3699
1 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -267,6 +267,10 @@ static bool DetectContainerLayerPropertiesBoundsChange(
return !aGeometry.mBounds.IsEqualEdges(aData->mGeometry->mBounds); 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 { struct DIGroup {
// XXX: Storing owning pointers to the BlobItemData in a hash table is not // XXX: Storing owning pointers to the BlobItemData in a hash table is not
// a good choice. There are two better options: // a good choice. There are two better options:
@ -1293,9 +1297,9 @@ bool Grouper::ConstructItemInsideInactive(
aGroup->mClippedImageBounds.Intersect(data->mRect); aGroup->mClippedImageBounds.Intersect(data->mRect);
if (aItem->GetType() == DisplayItemType::TYPE_FILTER) { if (aItem->GetType() == DisplayItemType::TYPE_FILTER) {
// If ComputeDifferences finds any change, we invalidate the entire // If ConstructGroupInsideInactive finds any change, we invalidate the
// container item. This is needed because blob merging requires the entire // entire container item. This is needed because blob merging requires the
// item to be within the invalid region. // entire item to be within the invalid region.
Matrix m = mTransform; Matrix m = mTransform;
mTransform = Matrix(); mTransform = Matrix();
bool old = aGroup->mSuppressInvalidations; bool old = aGroup->mSuppressInvalidations;
@ -1318,9 +1322,9 @@ bool Grouper::ConstructItemInsideInactive(
Matrix t2d; Matrix t2d;
bool is2D = t.CanDraw2D(&t2d); bool is2D = t.CanDraw2D(&t2d);
if (!is2D) { if (!is2D) {
// If ComputeDifferences finds any change, we invalidate the entire // If ConstructGroupInsideInactive finds any change, we invalidate the
// container item. This is needed because blob merging requires the entire // entire container item. This is needed because blob merging requires the
// item to be within the invalid region. // entire item to be within the invalid region.
bool old = aGroup->mSuppressInvalidations; bool old = aGroup->mSuppressInvalidations;
aGroup->mSuppressInvalidations = true; aGroup->mSuppressInvalidations = true;
mTransform = Matrix(); mTransform = Matrix();