Follow-up fix for bug 915342 (pushed the original patch without fixing a nit).
authorAndreas Gal <gal@mozilla.com>
Thu, 12 Sep 2013 00:07:29 +0200
changeset 159615 45fab5569c958ca828285e02f870bd1696e4b618
parent 159614 67032cf58c3158c43084b76b6215f2f1addd4d1f
child 159616 c05f8dce65ca6546c4ddd5ad7363c98aa00232a6
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)
bugs915342
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
Follow-up fix for bug 915342 (pushed the original patch without fixing a nit).
gfx/layers/opengl/CompositorOGL.cpp
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -1282,19 +1282,19 @@ CompositorOGL::EndFrame()
 
   if (sDrawFPS && !mFPS) {
     mFPS = new FPSState();
   } else if (!sDrawFPS && mFPS) {
     mFPS = nullptr;
   }
 
   if (mFPS) {
-    double fillRatio = 0;
-    if (mPixelsFilled > 0.0f && mPixelsPerFrame > 0.0f) {
-      fillRatio = 100.0f * double(mPixelsFilled) / double(mPixelsPerFrame);
+    float fillRatio = 0;
+    if (mPixelsFilled > 0 && mPixelsPerFrame > 0) {
+      fillRatio = 100.0f * float(mPixelsFilled) / float(mPixelsPerFrame);
       if (fillRatio > 999.0f)
         fillRatio = 999.0f;
     }
     mFPS->DrawFPS(TimeStamp::Now(), unsigned(fillRatio), mGLContext, GetProgram(Copy2DProgramType));
   }
 
   mGLContext->SwapBuffers();
   mGLContext->fBindBuffer(LOCAL_GL_ARRAY_BUFFER, 0);