Bug 898055 - Disable some apz debug output. r=bbondy
authorJim Mathies <jmathies@mozilla.com>
Fri, 06 Sep 2013 14:56:13 -0500
changeset 158904 74b5507fbd66a930b2035747853b6e1a3d1c4a7a
parent 158903 8a73c481e49e7a9d7ac95d6666182d0b79b63519
child 158905 4b03903fb8f5c888d2c273c4e3e26dfd04b81db9
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbondy
bugs898055
milestone26.0a1
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 898055 - Disable some apz debug output. r=bbondy
browser/metro/base/content/apzc.js
--- a/browser/metro/base/content/apzc.js
+++ b/browser/metro/base/content/apzc.js
@@ -10,16 +10,17 @@ let Cr = Components.results;
 
 /**
  * Handler for APZC display port and pan begin/end notifications.
  * These notifications are only sent by widget/windows/winrt code when
  * the pref: layers.async-pan-zoom.enabled is true.
  */
 
 var APZCObserver = {
+  _debugEvents: false,
   init: function() {
     this._enabled = Services.prefs.getBoolPref(kAsyncPanZoomEnabled);
     if (!this._enabled) {
       return;
     }
 
     let os = Services.obs;
     os.addObserver(this, "apzc-request-content-repaint", false);
@@ -90,35 +91,33 @@ var APZCObserver = {
         x: displayPort.x + scrollTo.x,
         y: displayPort.y + scrollTo.y,
         w: displayPort.width,
         h: displayPort.height,
         scale: resolution,
         id: scrollId
       });
 
-      Util.dumpLn("APZC scrollId: " + scrollId);
-      Util.dumpLn("APZC scrollTo.x: " + scrollTo.x + ", scrollTo.y: " + scrollTo.y);
-      Util.dumpLn("APZC setResolution: " + resolution);
-      Util.dumpLn("APZC setDisplayPortForElement: displayPort.x: " +
-                  displayPort.x + ", displayPort.y: " + displayPort.y +
-                  ", displayPort.width: " + displayPort.width +
-                  ", displayort.height: " + displayPort.height);
+      if (this._debugEvents) {
+        Util.dumpLn("APZC scrollId: " + scrollId);
+        Util.dumpLn("APZC scrollTo.x: " + scrollTo.x + ", scrollTo.y: " + scrollTo.y);
+        Util.dumpLn("APZC setResolution: " + resolution);
+        Util.dumpLn("APZC setDisplayPortForElement: displayPort.x: " +
+                    displayPort.x + ", displayPort.y: " + displayPort.y +
+                    ", displayPort.width: " + displayPort.width +
+                    ", displayort.height: " + displayPort.height);
+      }
     } else if (aTopic == "apzc-handle-pan-begin") {
       // When we're panning, hide the main scrollbars by setting imprecise
       // input (which sets a property on the browser which hides the scrollbar
       // via CSS).  This reduces jittering from left to right. We may be able
       // to get rid of this once we implement axis locking in /gfx APZC.
-      Util.dumpLn("APZC pan-begin");
       if (InputSourceHelper.isPrecise) {
         InputSourceHelper._imprecise();
       }
-
-    } else if (aTopic == "apzc-handle-pan-end") {
-      Util.dumpLn("APZC pan-end");
     }
   },
 
   receiveMessage: function(aMessage) {
     let json = aMessage.json;
     switch (aMessage.name) {
       case "scroll": {
         let data = json.viewId + " " + json.presShellId + " (" + json.scrollOffset.x + ", " + json.scrollOffset.y + ")";