Bug 662649. DrawFPS: Add a comment about why DrawFPS is a little weird.
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Wed, 22 Jun 2011 14:49:31 -0400
changeset 71870 660b05a3ba56453d23267bf675bcda1d99289b1e
parent 71869 f46f26308ec8ea55150cc7185835d0af64db7e43
child 71871 3b95f57892ba7e0326a7822740cab09bdbd4a015
push id209
push userbzbarsky@mozilla.com
push dateTue, 05 Jul 2011 17:42:16 +0000
treeherdermozilla-aurora@cc6e30cce8af [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs662649
milestone7.0a1
Bug 662649. DrawFPS: Add a comment about why DrawFPS is a little weird.
gfx/layers/opengl/LayerManagerOGL.cpp
--- a/gfx/layers/opengl/LayerManagerOGL.cpp
+++ b/gfx/layers/opengl/LayerManagerOGL.cpp
@@ -533,16 +533,18 @@ LayerManagerOGL::RootLayer() const
   if (mDestroyed) {
     NS_WARNING("Call on destroyed layer manager");
     return nsnull;
   }
 
   return static_cast<LayerOGL*>(mRoot->ImplData());
 }
 
+/* This function tries to stick to portable C89 as much as possible
+ * so that it can be easily copied into other applications */
 void
 LayerManagerOGL::FPSState::DrawFPS(GLContext* context, CopyProgram* copyprog)
 {
   fcount++;
 
   int rate = 30;
   if (fcount >= rate) {
     TimeStamp now = TimeStamp::Now();