Bug 1202317. Bail out early if RequestRect is going to do redundant work. r=mstange

This commit is contained in:
Robert O'Callahan 2015-09-07 17:08:36 +12:00
parent 6b7b9e651a
commit 942b0aae4e

View File

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