зеркало из https://github.com/mozilla/gecko-dev.git
Include visible region changes in the cached invalid region for ContainerLayers. (bug 1381666 part 4, r=mattwoodrow)
This commit is contained in:
Родитель
264a0b8e7e
Коммит
427fc1d03c
|
@ -421,10 +421,22 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (container->UseIntermediateSurface()) {
|
if (container->UseIntermediateSurface()) {
|
||||||
IntRect bounds = invalidateWholeLayer
|
Maybe<IntRect> bounds;
|
||||||
? mLayer->GetLocalVisibleRegion().ToUnknownRegion().GetBounds()
|
|
||||||
: result.GetBounds();
|
if (!invalidateWholeLayer) {
|
||||||
container->SetInvalidCompositeRect(bounds);
|
bounds = Some(result.GetBounds());
|
||||||
|
|
||||||
|
// Process changes in the visible region.
|
||||||
|
IntRegion newVisible = mLayer->GetLocalVisibleRegion().ToUnknownRegion();
|
||||||
|
if (!newVisible.IsEqual(mVisibleRegion)) {
|
||||||
|
newVisible.XorWith(mVisibleRegion);
|
||||||
|
bounds = bounds->SafeUnion(newVisible.GetBounds());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!bounds) {
|
||||||
|
bounds = Some(mLayer->GetLocalVisibleRegion().GetBounds().ToUnknownRect());
|
||||||
|
}
|
||||||
|
container->SetInvalidCompositeRect(bounds.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mLayer->Extend3DContext()) {
|
if (!mLayer->Extend3DContext()) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче