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

--HG--
extra : commitid : JQHaCF87nEG
extra : rebase_source : facdbfb7d1d06b64920e8f014367145cfdea9a43
This commit is contained in:
Robert O'Callahan 2015-09-07 17:08:36 +12:00
Родитель e8ed21a544
Коммит ff15b1bada
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

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