Commit b7b6ee36 authored by Jeff Muizelaar's avatar Jeff Muizelaar
Browse files

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
parent 4f748cc1
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -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();