mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 1451458. Make sure we always clear items on size change. r=mstange
This changes the code around mFollowing group size changes to match the code in DoGroupingForDisplayList. Specifically, it makes sure we always ClearItems() on size changes even if we don't have a key. --HG-- extra : rebase_source : 2063974082862906a2831bdd76ac86871ee3dbc3
This commit is contained in:
parent
f6f7d62d44
commit
0d0e71fde6
@ -920,21 +920,20 @@ Grouper::ConstructGroups(WebRenderCommandBuilder* aCommandBuilder,
|
||||
// tighter for just the sublist that made it into this group.
|
||||
// We want to ensure the tight bounds are still clipped by area
|
||||
// that we're building the display list for.
|
||||
if (groupData->mFollowingGroup.mKey) {
|
||||
if (!groupData->mFollowingGroup.mGroupBounds.IsEqualEdges(currentGroup->mGroupBounds) ||
|
||||
groupData->mFollowingGroup.mScale != currentGroup->mScale ||
|
||||
groupData->mFollowingGroup.mAppUnitsPerDevPixel != currentGroup->mAppUnitsPerDevPixel) {
|
||||
if (groupData->mFollowingGroup.mAppUnitsPerDevPixel != currentGroup->mAppUnitsPerDevPixel) {
|
||||
printf("app unit change following: %d %d\n", groupData->mFollowingGroup.mAppUnitsPerDevPixel, currentGroup->mAppUnitsPerDevPixel);
|
||||
}
|
||||
// The group changed size
|
||||
GP("Inner group size change\n");
|
||||
aCommandBuilder->mManager->AddImageKeyForDiscard(groupData->mFollowingGroup.mKey.value());
|
||||
groupData->mFollowingGroup.mKey = Nothing();
|
||||
groupData->mFollowingGroup.ClearItems();
|
||||
|
||||
if (!groupData->mFollowingGroup.mGroupBounds.IsEqualEdges(currentGroup->mGroupBounds) ||
|
||||
groupData->mFollowingGroup.mScale != currentGroup->mScale ||
|
||||
groupData->mFollowingGroup.mAppUnitsPerDevPixel != currentGroup->mAppUnitsPerDevPixel) {
|
||||
if (groupData->mFollowingGroup.mAppUnitsPerDevPixel != currentGroup->mAppUnitsPerDevPixel) {
|
||||
GP("app unit change following: %d %d\n", groupData->mFollowingGroup.mAppUnitsPerDevPixel, currentGroup->mAppUnitsPerDevPixel);
|
||||
}
|
||||
// The group changed size
|
||||
GP("Inner group size change\n");
|
||||
groupData->mFollowingGroup.ClearItems();
|
||||
if (groupData->mFollowingGroup.mKey) {
|
||||
IntSize size = currentGroup->mGroupBounds.Size().ScaleToNearestPixels(currentGroup->mScale.width, currentGroup->mScale.height, mAppUnitsPerDevPixel);
|
||||
groupData->mFollowingGroup.mInvalidRect = IntRect(IntPoint(0, 0), size);
|
||||
aCommandBuilder->mManager->AddImageKeyForDiscard(groupData->mFollowingGroup.mKey.value());
|
||||
groupData->mFollowingGroup.mKey = Nothing();
|
||||
}
|
||||
}
|
||||
groupData->mFollowingGroup.mGroupBounds = currentGroup->mGroupBounds;
|
||||
|
Loading…
Reference in New Issue
Block a user