зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e8ed21a544
Коммит
ff15b1bada
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче