зеркало из https://github.com/mozilla/gecko-dev.git
Treat canvas invalidations as animation activity for JS heuristics, bug 753630. r=dmandelin
This commit is contained in:
Родитель
6359cf9f42
Коммит
c30644f997
|
@ -679,6 +679,19 @@ nsHTMLCanvasElement::InvalidateCanvasContent(const gfxRect* damageRect)
|
|||
if (layer) {
|
||||
static_cast<CanvasLayer*>(layer)->Updated();
|
||||
}
|
||||
|
||||
/*
|
||||
* Treat canvas invalidations as animation activity for JS. Frequently
|
||||
* invalidating a canvas will feed into heuristics and cause JIT code to be
|
||||
* kept around longer, for smoother animations.
|
||||
*/
|
||||
nsIScriptGlobalObject *scope = OwnerDoc()->GetScriptGlobalObject();
|
||||
if (scope) {
|
||||
JSObject *obj = scope->GetGlobalJSObject();
|
||||
if (obj) {
|
||||
js::NotifyAnimationActivity(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче