Bug 1151102 - Add some diagnostic logging. r=snorp
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 09 Sep 2015 23:22:19 -0400
changeset 294310 f98e6bf596316ff4b3534317c9c37e0ba5ad9596
parent 294309 4e57b1f7edbe0acf84b8b52b91b7ba23db3782a4
child 294311 d05b4fbebba817e30ca6eefb73ca3c3b4bc2d70a
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1151102 - Add some diagnostic logging. r=snorp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -6037,16 +6037,19 @@ PresShell::Paint(nsView*        aViewToP
   AutoUpdateHitRegion updateHitRegion(this, frame);
   // Whether or not we should set first paint when painting is
   // suppressed is debatable. For now we'll do it because
   // B2G relies on first paint to configure the viewport and
   // we only want to do that when we have real content to paint.
   // See Bug 798245
   if (mIsFirstPaint && !mPaintingSuppressed) {
+    __android_log_print(ANDROID_LOG_INFO, "GeckoBug1151102", "PresShell doing a first-paint");
     mIsFirstPaint = false;
   if (frame && isRetainingManager) {
     // Try to do an empty transaction, if the frame tree does not
--- a/mobile/android/base/gfx/GeckoLayerClient.java
+++ b/mobile/android/base/gfx/GeckoLayerClient.java
@@ -601,16 +601,17 @@ class GeckoLayerClient implements LayerV
             // as possible. The call to PanZoomController.abortAnimation accomplishes this by calling the
             // forceRedraw function, which sends the viewport to gecko. The display port request is
             // actually a full viewport update, which is fine because if browser.js has somehow moved to
             // be out of sync with this first-paint viewport, then we force them back in sync.
             // Indicate that the document is about to be composited so the
             // LayerView background can be removed.
+            Log.i("GeckoBug1151102", "Done first paint; state " + mView.getPaintState());
             if (mView.getPaintState() == LayerView.PAINT_START) {
         mContentDocumentIsDisplayed = true;
--- a/mobile/android/base/gfx/LayerRenderer.java
+++ b/mobile/android/base/gfx/LayerRenderer.java
@@ -632,32 +632,34 @@ public class LayerRenderer implements Ta
             // Remove background color once we've painted. GeckoLayerClient is
             // responsible for setting this flag before current document is
             // composited.
             if (mView.getPaintState() == LayerView.PAINT_BEFORE_FIRST) {
                 mView.post(new Runnable() {
                     public void run() {
+                        Log.i("GeckoBug1151102", "Cleared bg color");
             mLastFrameTime = mFrameStartTime;
     public void onTabChanged(final Tab tab, Tabs.TabEvents msg, Object data) {
         // Sets the background of the newly selected tab. This background color
         // gets cleared in endDrawing(). This function runs on the UI thread,
         // but other code that touches the paint state is run on the compositor
         // thread, so this may need to be changed if any problems appear.
         if (msg == Tabs.TabEvents.SELECTED) {
             if (mView != null) {
+                Log.i("GeckoBug1151102", "Tab switch; entering PAINT_START");
     public void updateZoomedView(final ByteBuffer data) {
         ThreadUtils.postToUiThread(new Runnable() {
--- a/mobile/android/base/gfx/LayerView.java
+++ b/mobile/android/base/gfx/LayerView.java
@@ -288,16 +288,17 @@ public class LayerView extends ScrollVie
             addView(mTextureView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
         } else {
             // This will stop PropertyAnimator from creating a drawing cache (i.e. a bitmap)
             // from a SurfaceView, which is just not possible (the bitmap will be transparent).
             mSurfaceView = new LayerSurfaceView(getContext(), this);
+            Log.i("GeckoBug1151102", "Initialized surfaceview");
             // The "filler" view sits behind the URL bar and should never be
             // visible. It exists solely to make this LayerView actually
             // scrollable so that we can shift the surface around on the screen.
             // Once we drop support for pre-Honeycomb Android versions this
             // should not be needed; we can just turn LayerView back into a
             // FrameLayout that holds mSurfaceView and nothing else.
             mFillerView = new View(getContext()) {
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -1029,16 +1029,17 @@ var BrowserApp = {
     let tab = this.selectedTab;
     if (!tab)
       return false;
     return tab.contentDocumentIsDisplayed;
   contentDocumentChanged: function() {
+    dump("GeckoBug1151102: Setting first-paint flag on DWU");
     window.top.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).isFirstPaint = true;
   get tabs() {
     return this._tabs;
--- a/widget/android/AndroidBridge.cpp
+++ b/widget/android/AndroidBridge.cpp
@@ -677,16 +677,17 @@ AndroidBridge::GetIconForExtension(const
 AndroidBridge::SetLayerClient(GeckoLayerClient::Param jobj)
     // if resetting is true, that means Android destroyed our GeckoApp activity
     // and we had to recreate it, but all the Gecko-side things were not destroyed.
     // We therefore need to link up the new java objects to Gecko, and that's what
     // we do here.
     bool resetting = (mLayerClient != nullptr);
+    __android_log_print(ANDROID_LOG_INFO, "GeckoBug1151102", "Reseting layer client: %d", resetting);
     mLayerClient = jobj;
     if (resetting) {
         // since we are re-linking the new java objects to Gecko, we need to get
         // the viewport from the compositor (since the Java copy was thrown away)
         // and we do that by setting the first-paint flag.