Bug 1150552 - Fix partial present bug with FPS counter. r=mattwoodrow
authorBenoit Girard <b56girard@gmail.com>
Fri, 07 Aug 2015 14:11:18 -0400
changeset 288531 803ba9e9abc703889ce73f0d4f16a2b411de2586
parent 288530 a57c40f8119978ab52ab84d3e68b7128a6d0b781
child 288532 c58b7d331f5bc5b24bd1b0201e24c6adf6aed27e
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1150552
milestone42.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 1150552 - Fix partial present bug with FPS counter. r=mattwoodrow
gfx/layers/composite/LayerManagerComposite.cpp
--- a/gfx/layers/composite/LayerManagerComposite.cpp
+++ b/gfx/layers/composite/LayerManagerComposite.cpp
@@ -448,30 +448,36 @@ LayerManagerComposite::RenderDebugOverla
       EffectChain effects;
       effects.mPrimaryEffect = new EffectSolidColor(gfx::Color(1, 0, 0, 1));
       mCompositor->DrawQuad(gfx::Rect(aBounds.width - 20, 0, aBounds.width, 20),
                             aBounds, effects, alpha, gfx::Matrix4x4());
 
       mUnusedApzTransformWarning = false;
       SetDebugOverlayWantsNextFrame(true);
     }
+
+    // Each frame is invalidate by the previous frame for simplicity
+    AddInvalidRegion(nsIntRect(0, 0, 256, 256));
   } else {
     mFPS = nullptr;
   }
 
   if (drawFrameColorBars) {
     gfx::Rect sideRect(0, 0, 10, aBounds.height);
 
     EffectChain effects;
     effects.mPrimaryEffect = new EffectSolidColor(gfxUtils::GetColorForFrameNumber(sFrameCount));
     mCompositor->DrawQuad(sideRect,
                           sideRect,
                           effects,
                           1.0,
                           gfx::Matrix4x4());
+
+    // Each frame is invalidate by the previous frame for simplicity
+    AddInvalidRegion(nsIntRect(0, 0, sideRect.width, sideRect.height));
   }
 
 #ifdef MOZ_PROFILING
   if (drawFrameCounter) {
     profiler_set_frame_number(sFrameCount);
     const char* qr = sQRCodeTable[sFrameCount%256];
 
     int size = 21;
@@ -504,16 +510,19 @@ LayerManagerComposite::RenderDebugOverla
                                           bitWidth, bitWidth),
                                 clip,
                                 effects,
                                 opacity,
                                 gfx::Matrix4x4());
         }
       }
     }
+
+    // Each frame is invalidate by the previous frame for simplicity
+    AddInvalidRegion(nsIntRect(0, 0, 256, 256));
   }
 #endif
 
   if (drawFrameColorBars || drawFrameCounter) {
     // We intentionally overflow at 2^16.
     sFrameCount++;
   }
 }