зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1143575. Exit composition early if nothing is invalid. r=mattwoodrow
We need this change so that when ImageHost has a next image to display more than one composition-interval in the future, we skip the actual compositing work in those intermediate composition(s) if nothing else has changed. This change is a little bit scary since it breaks any code that was previously assuming ScheduleComposition would actually update the screen. However, that code was already broken for BasicCompositor. --HG-- extra : commitid : FUFFaJDSwfu extra : rebase_source : eb2d5fadd5dbd417e7a25c05b148bd8964e8c2a3
This commit is contained in:
Родитель
008359665e
Коммит
66a72d1a69
|
@ -283,6 +283,11 @@ LayerManagerComposite::EndTransaction(const TimeStamp& aTimeStamp,
|
|||
mInvalidRegion.Or(mInvalidRegion, mRenderBounds);
|
||||
}
|
||||
|
||||
if (mInvalidRegion.IsEmpty() && !mTarget) {
|
||||
// Composition requested, but nothing has changed. Don't do any work.
|
||||
return;
|
||||
}
|
||||
|
||||
if (mRoot && !(aFlags & END_NO_IMMEDIATE_REDRAW)) {
|
||||
MOZ_ASSERT(!aTimeStamp.IsNull());
|
||||
// Set composition timestamp here because we need it in
|
||||
|
|
Загрузка…
Ссылка в новой задаче