mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1202317. Bail out early if RequestRect is going to do redundant work. r=mstange
This commit is contained in:
parent
6b7b9e651a
commit
942b0aae4e
@ -629,6 +629,12 @@ FilterNodeSoftware::GetOutput(const IntRect &aRect)
|
||||
void
|
||||
FilterNodeSoftware::RequestRect(const IntRect &aRect)
|
||||
{
|
||||
if (mRequestedRect.Contains(aRect)) {
|
||||
// Bail out now. Otherwise pathological filters can spend time exponential
|
||||
// in the number of primitives, e.g. if each primitive takes the
|
||||
// previous primitive as its two inputs.
|
||||
return;
|
||||
}
|
||||
mRequestedRect = mRequestedRect.Union(aRect);
|
||||
RequestFromInputsForRect(aRect);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user