зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1274397 - Small optimization to use a RegionBuilder. r=tnikkel
MozReview-Commit-ID: 6Yro9uDIIEd
This commit is contained in:
Родитель
d54ca15369
Коммит
d6c154f454
|
@ -113,6 +113,7 @@
|
|||
#include "mozilla/RuleNodeCacheConditions.h"
|
||||
#include "mozilla/StyleSetHandle.h"
|
||||
#include "mozilla/StyleSetHandleInlines.h"
|
||||
#include "RegionBuilder.h"
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsXULPopupManager.h"
|
||||
|
@ -9064,14 +9065,14 @@ nsLayoutUtils::TransformToAncestorAndCombineRegions(
|
|||
return;
|
||||
}
|
||||
bool isPrecise;
|
||||
nsRegion transformedRegion;
|
||||
RegionBuilder<nsRegion> transformedRegion;
|
||||
for (nsRegion::RectIterator it = aRegion.RectIter(); !it.Done(); it.Next()) {
|
||||
nsRect transformed = TransformFrameRectToAncestor(
|
||||
aFrame, it.Get(), aAncestorFrame, &isPrecise, aMatrixCache);
|
||||
transformedRegion.OrWith(transformed);
|
||||
}
|
||||
nsRegion* dest = isPrecise ? aPreciseTargetDest : aImpreciseTargetDest;
|
||||
dest->OrWith(transformedRegion);
|
||||
dest->OrWith(transformedRegion.ToRegion());
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
|
|
Загрузка…
Ссылка в новой задаче