hwc: Add debug logging for fps
This is indicative of how many frames are posted to the display
by SurfaceFlinger. Set debug.gr.calcfps to 1 and restart the
framework to enable.
Change-Id: Ic503c14380fd7d8a5b062aa5da0d61bfc3991cb2
CRs-Fixed: 462010
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index bc705ac..d21e537 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -35,6 +35,7 @@
#include "hwc_mdpcomp.h"
#include "external.h"
#include "hwc_copybit.h"
+#include "profiler.h"
using namespace qhwc;
#define VSYNC_DEBUG 0
@@ -458,6 +459,9 @@
ret = -EINVAL;
}
}
+ // This is only indicative of how many times SurfaceFlinger posts
+ // frames to the display.
+ CALC_FPS();
return ret;
}