Bug 945655 - Composite filters with operator IN have a result that is the intersection of the input rects, not the union. FilterNodeSoftware part. r=roc

This commit is contained in:
Markus Stange 2013-12-10 14:50:41 +01:00
parent 9927ea1975
commit 14879d50bc

View File

@ -2652,7 +2652,12 @@ FilterNodeCompositeSoftware::GetOutputRectInRect(const IntRect& aRect)
{
IntRect rect;
for (size_t inputIndex = 0; inputIndex < NumberOfSetInputs(); inputIndex++) {
rect = rect.Union(GetInputRectInRect(IN_COMPOSITE_IN_START + inputIndex, aRect));
IntRect inputRect = GetInputRectInRect(IN_COMPOSITE_IN_START + inputIndex, aRect);
if (mOperator == COMPOSITE_OPERATOR_IN && inputIndex > 0) {
rect = rect.Intersect(inputRect);
} else {
rect = rect.Union(inputRect);
}
}
return rect;
}