зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 9c232821ae5c (bug 1192910)
This commit is contained in:
Родитель
2e774e974c
Коммит
12aacd8ccf
|
@ -892,19 +892,9 @@ APZCCallbackHelper::NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrol
|
|||
}
|
||||
|
||||
void
|
||||
APZCCallbackHelper::NotifyFlushComplete(nsIPresShell* aShell)
|
||||
APZCCallbackHelper::NotifyFlushComplete()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
// In some cases, flushing the APZ state to the main thread doesn't actually
|
||||
// trigger a flush and repaint (this is an intentional optimization - the stuff
|
||||
// visible to the user is still correct). However, reftests update their
|
||||
// snapshot based on invalidation events that are emitted during paints,
|
||||
// so we ensure that we kick off a paint when an APZ flush is done. Note that
|
||||
// only chrome/testing code can trigger this behaviour.
|
||||
if (aShell && aShell->GetRootFrame()) {
|
||||
aShell->GetRootFrame()->SchedulePaint();
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIObserverService> observerService = mozilla::services::GetObserverService();
|
||||
MOZ_ASSERT(observerService);
|
||||
observerService->NotifyObservers(nullptr, "apz-repaints-flushed", nullptr);
|
||||
|
|
|
@ -161,7 +161,7 @@ public:
|
|||
static void NotifyMozMouseScrollEvent(const FrameMetrics::ViewID& aScrollId, const nsString& aEvent);
|
||||
|
||||
/* Notify content that the repaint flush is complete. */
|
||||
static void NotifyFlushComplete(nsIPresShell* aShell);
|
||||
static void NotifyFlushComplete();
|
||||
|
||||
/* Temporarily ignore the Displayport for better paint performance. */
|
||||
static void SuppressDisplayport(const bool& aEnabled);
|
||||
|
|
|
@ -232,5 +232,5 @@ void
|
|||
ChromeProcessController::NotifyFlushComplete()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
APZCCallbackHelper::NotifyFlushComplete(GetPresShell());
|
||||
APZCCallbackHelper::NotifyFlushComplete();
|
||||
}
|
||||
|
|
|
@ -151,11 +151,7 @@ APZChild::RecvNotifyAPZStateChange(const ViewID& aViewId,
|
|||
bool
|
||||
APZChild::RecvNotifyFlushComplete()
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
if (nsCOMPtr<nsIDocument> doc = mBrowser->GetDocument()) {
|
||||
shell = doc->GetShell();
|
||||
}
|
||||
APZCCallbackHelper::NotifyFlushComplete(shell.get());
|
||||
APZCCallbackHelper::NotifyFlushComplete();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче