Bug 1061414 - Fix VisualFrameWarning logic. r=milan, a=lmandel
authorBenoit Girard <b56girard@gmail.com>
Tue, 02 Sep 2014 14:37:17 -0400
changeset 224892 f10762a502501e4d9703acfec7504eb3613569f5
parent 224891 098e2b50221b292d5f50593473484970cca3491a
child 224893 c7477d4b33e7d2f9c73acd9384476ff1d7da91b1
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmilan, lmandel
bugs1061414
milestone34.0a2
Bug 1061414 - Fix VisualFrameWarning logic. r=milan, a=lmandel
gfx/layers/composite/LayerManagerComposite.h
--- a/gfx/layers/composite/LayerManagerComposite.h
+++ b/gfx/layers/composite/LayerManagerComposite.h
@@ -240,18 +240,19 @@ public:
   TextRenderer* GetTextRenderer() { return mTextRenderer; }
 
   /**
    * Add an on frame warning.
    * @param severity ranges from 0 to 1. It's used to compute the warning color.
    */
   void VisualFrameWarning(float severity) {
     mozilla::TimeStamp now = TimeStamp::Now();
-    if (severity > mWarningLevel ||
-        mWarnTime + TimeDuration::FromMilliseconds(1500) < now) {
+    if (mWarnTime.IsNull() ||
+        severity > mWarningLevel ||
+        mWarnTime + TimeDuration::FromMilliseconds(150) < now) {
       mWarnTime = now;
       mWarningLevel = severity;
     }
   }
 
   void UnusedApzTransformWarning() {
     mUnusedApzTransformWarning = true;
   }