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
bbfebead46
commit
66065bfa75
@ -2571,8 +2571,22 @@ FilterNodeArithmeticCombineSoftware::RequestFromInputsForRect(const IntRect &aRe
|
|||||||
IntRect
|
IntRect
|
||||||
FilterNodeArithmeticCombineSoftware::GetOutputRectInRect(const IntRect& aRect)
|
FilterNodeArithmeticCombineSoftware::GetOutputRectInRect(const IntRect& aRect)
|
||||||
{
|
{
|
||||||
return GetInputRectInRect(IN_ARITHMETIC_COMBINE_IN, aRect).Union(
|
if (mK4 > 0.0f) {
|
||||||
GetInputRectInRect(IN_ARITHMETIC_COMBINE_IN2, aRect)).Intersect(aRect);
|
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()
|
FilterNodeCompositeSoftware::FilterNodeCompositeSoftware()
|
||||||
|
Loading…
Reference in New Issue
Block a user