From 58676afccd40ad3e51ccdaefd7ba3c23bd8d476f Mon Sep 17 00:00:00 2001 From: Harshad Bhutada Date: Mon, 26 Mar 2012 11:11:51 +0530 Subject: [PATCH] hardware/qcom/display: Fix overcounting frames with CALC_FPS With a recent change, debug.gr.calcfps was enabled, frames were being overcounted. This change fixes it. CRs-fixed: 350335 (cherry picked from commit e8ea630b6b629403ad713b8cb3d912c4d54e7699) Change-Id: I863072f3311c584edd30f7be74a3ab8122f05f01 --- libhwcomposer/hwcomposer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libhwcomposer/hwcomposer.cpp b/libhwcomposer/hwcomposer.cpp index 2a48a1c..7e3a6bf 100644 --- a/libhwcomposer/hwcomposer.cpp +++ b/libhwcomposer/hwcomposer.cpp @@ -1669,9 +1669,9 @@ static int hwc_set(hwc_composer_device_t *dev, EGLBoolean sucess = eglSwapBuffers((EGLDisplay)dpy, (EGLSurface)sur); if (!sucess) { ret = HWC_EGL_ERROR; - } else { - CALC_FPS(); } + } else { + CALC_FPS(); } // Unlock the previously locked buffer, since the overlay has completed reading the buffer