Bug 1084672 - Call NotifyDidPaint from the refresh driver to ensure it gets called regardless of whether OMTC is used or not. r=mattwoodrow, a=lmandel
authorRobert O'Callahan <robert@ocallahan.org>
Wed, 22 Oct 2014 14:26:17 +1300
changeset 226037 2b08e1cb3c6f
parent 226036 9f14f2af8bf7
child 226038 49f10dbc7d69
push id4119
push userryanvm@gmail.com
push date2014-11-12 22:22 +0000
treeherdermozilla-beta@f2dd9f2a084a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, lmandel
bugs1084672
milestone34.0
Bug 1084672 - Call NotifyDidPaint from the refresh driver to ensure it gets called regardless of whether OMTC is used or not. r=mattwoodrow, a=lmandel
layout/base/nsPresShell.cpp
layout/base/nsRefreshDriver.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -8392,20 +8392,16 @@ PresShell::DidPaintWindow()
   }
 
   nsRootPresContext* rootPresContext = mPresContext->GetRootPresContext();
   if (rootPresContext != mPresContext) {
     // This could be a popup's presshell. No point in notifying XPConnect
     // about compositing of popups.
     return;
   }
-
-  if (nsContentUtils::XPConnect()) {
-    nsContentUtils::XPConnect()->NotifyDidPaint();
-  }
 }
 
 bool
 PresShell::IsVisible()
 {
   if (!mViewManager)
     return false;
 
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -1275,16 +1275,20 @@ nsRefreshDriver::Tick(int64_t aNowEpoch,
     nsRefPtr<nsViewManager> vm = mPresContext->GetPresShell()->GetViewManager();
     vm->ProcessPendingUpdates();
 #ifdef MOZ_DUMP_PAINTING
     if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) {
       printf_stderr("Ending ProcessPendingUpdates\n");
     }
 #endif
     profiler_tracing("Paint", "DisplayList", TRACING_INTERVAL_END);
+
+    if (nsContentUtils::XPConnect()) {
+      nsContentUtils::XPConnect()->NotifyDidPaint();
+    }
   }
 
   for (uint32_t i = 0; i < mPostRefreshObservers.Length(); ++i) {
     mPostRefreshObservers[i]->DidRefresh();
   }
 
   NS_ASSERTION(mInRefresh, "Still in refresh");
 }