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 5582cfa361
commit bbfebead46

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;
}