mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1066270 - Simplify mTargetBounds usage. r=roc
This commit is contained in:
parent
b5474436e3
commit
a6c4f51799
@ -214,13 +214,16 @@ nsFilterInstance::nsFilterInstance(nsIFrame *aTargetFrame,
|
||||
// Convert the passed in rects from frame space to filter space:
|
||||
mPostFilterDirtyRegion = FrameSpaceToFilterSpace(aPostFilterDirtyRegion);
|
||||
mPreFilterDirtyRegion = FrameSpaceToFilterSpace(aPreFilterDirtyRegion);
|
||||
|
||||
nsIntRect targetBounds;
|
||||
if (aPreFilterVisualOverflowRectOverride) {
|
||||
mTargetBounds =
|
||||
targetBounds =
|
||||
FrameSpaceToFilterSpace(aPreFilterVisualOverflowRectOverride);
|
||||
} else if (mTargetFrame) {
|
||||
nsRect preFilterVOR = mTargetFrame->GetPreEffectsVisualOverflowRect();
|
||||
mTargetBounds = FrameSpaceToFilterSpace(&preFilterVOR);
|
||||
targetBounds = FrameSpaceToFilterSpace(&preFilterVOR);
|
||||
}
|
||||
mTargetBounds.UnionRect(mTargetBBoxInFilterSpace, targetBounds);
|
||||
|
||||
mInitialized = true;
|
||||
}
|
||||
@ -332,10 +335,7 @@ nsFilterInstance::ComputeNeededBoxes()
|
||||
mFilterDescription, mPostFilterDirtyRegion,
|
||||
sourceGraphicNeededRegion, fillPaintNeededRegion, strokePaintNeededRegion);
|
||||
|
||||
nsIntRect sourceBounds;
|
||||
sourceBounds.UnionRect(mTargetBBoxInFilterSpace, mTargetBounds);
|
||||
|
||||
sourceGraphicNeededRegion.And(sourceGraphicNeededRegion, sourceBounds);
|
||||
sourceGraphicNeededRegion.And(sourceGraphicNeededRegion, mTargetBounds);
|
||||
|
||||
mSourceGraphic.mNeededBounds = sourceGraphicNeededRegion.GetBounds();
|
||||
mFillPaint.mNeededBounds = fillPaintNeededRegion.GetBounds();
|
||||
@ -507,11 +507,8 @@ nsFilterInstance::ComputePostFilterDirtyRegion()
|
||||
nsRect
|
||||
nsFilterInstance::ComputePostFilterExtents()
|
||||
{
|
||||
nsIntRect sourceBounds;
|
||||
sourceBounds.UnionRect(mTargetBBoxInFilterSpace, mTargetBounds);
|
||||
|
||||
nsIntRegion postFilterExtents =
|
||||
FilterSupport::ComputePostFilterExtents(mFilterDescription, sourceBounds);
|
||||
FilterSupport::ComputePostFilterExtents(mFilterDescription, mTargetBounds);
|
||||
return FilterSpaceToFrameSpace(postFilterExtents.GetBounds());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user