Skip to content

Commit

Permalink
Bug 1382314 - Fix invalidation problem for layers-free mode. r=jrmuizel
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: 8z03n7zmvOz
  • Loading branch information
demo99 committed Jul 21, 2017
1 parent 44f7c64 commit 031dcf9
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions gfx/layers/wr/WebRenderLayerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,15 +380,21 @@ WebRenderLayerManager::PushItemAsImage(nsDisplayItem* aItem,
nsAutoPtr<nsDisplayItemGeometry> geometry = fallbackData->GetGeometry();

if (geometry) {
nsPoint shift = itemBounds.TopLeft() - geometry->mBounds.TopLeft();
geometry->MoveBy(shift);
aItem->ComputeInvalidationRegion(aDisplayListBuilder, geometry, &invalidRegion);
nsRect lastBounds = fallbackData->GetBounds();
lastBounds.MoveBy(shift);

if (!lastBounds.IsEqualInterior(clippedBounds)) {
invalidRegion.OrWith(lastBounds);
nsRect invalid;
if (aItem->IsInvalid(invalid)) {
invalidRegion.OrWith(clippedBounds);
} else {
nsPoint shift = itemBounds.TopLeft() - geometry->mBounds.TopLeft();
geometry->MoveBy(shift);
aItem->ComputeInvalidationRegion(aDisplayListBuilder, geometry, &invalidRegion);

nsRect lastBounds = fallbackData->GetBounds();
lastBounds.MoveBy(shift);

if (!lastBounds.IsEqualInterior(clippedBounds)) {
invalidRegion.OrWith(lastBounds);
invalidRegion.OrWith(clippedBounds);
}
}
}

Expand Down

0 comments on commit 031dcf9

Please sign in to comment.