mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 945655 - Reduce arithmetic combine filter output rect depending on the coefficients. r=roc
This commit is contained in:
parent
14879d50bc
commit
931079671a
@ -2571,8 +2571,22 @@ FilterNodeArithmeticCombineSoftware::RequestFromInputsForRect(const IntRect &aRe
|
||||
IntRect
|
||||
FilterNodeArithmeticCombineSoftware::GetOutputRectInRect(const IntRect& aRect)
|
||||
{
|
||||
return GetInputRectInRect(IN_ARITHMETIC_COMBINE_IN, aRect).Union(
|
||||
GetInputRectInRect(IN_ARITHMETIC_COMBINE_IN2, aRect)).Intersect(aRect);
|
||||
if (mK4 > 0.0f) {
|
||||
return aRect;
|
||||
}
|
||||
IntRect rectFrom1 = GetInputRectInRect(IN_ARITHMETIC_COMBINE_IN, aRect).Intersect(aRect);
|
||||
IntRect rectFrom2 = GetInputRectInRect(IN_ARITHMETIC_COMBINE_IN2, aRect).Intersect(aRect);
|
||||
IntRect result;
|
||||
if (mK1 > 0.0f) {
|
||||
result = rectFrom1.Intersect(rectFrom2);
|
||||
}
|
||||
if (mK2 > 0.0f) {
|
||||
result = result.Union(rectFrom1);
|
||||
}
|
||||
if (mK3 > 0.0f) {
|
||||
result = result.Union(rectFrom2);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
FilterNodeCompositeSoftware::FilterNodeCompositeSoftware()
|
||||
|
Loading…
Reference in New Issue
Block a user