From 00e6cb061608272bad5d849f97fe3666981cbe88 Mon Sep 17 00:00:00 2001 From: Paras Morabia Date: Fri, 6 Jul 2012 08:26:40 +0530 Subject: [PATCH] hwc: Allow SurfaceFlinger to force composition. Expose API for SurfaceFlinger to set force composition. The SurfaceFlinger can set the force composition flag for avoiding skip composition. CRs-fixed: 374830 (cherry picked from commit a3c5794b27d2bf7fbc539e3f13a8daaf74724d94) Conflicts: libhwcomposer/a-family/hwcomposer.cpp libhwcomposer/hwcomposer.cpp libqcomui/qcom_ui.h Change-Id: I277484ea5ab4ef8d2bccdd480785356d02f6efa8 --- libhwcomposer/hwcomposer.cpp | 4 ++++ libqcomui/qcom_ui.h | 1 + 2 files changed, 5 insertions(+) diff --git a/libhwcomposer/hwcomposer.cpp b/libhwcomposer/hwcomposer.cpp index ea7eb1e..4e8d14f 100644 --- a/libhwcomposer/hwcomposer.cpp +++ b/libhwcomposer/hwcomposer.cpp @@ -962,6 +962,10 @@ static void hwc_perform(hwc_composer_device_t *dev, int event, int value) { hwc_enableHDMIOutput(dev, value); break; #endif + case EVENT_FORCE_COMPOSITION: + ctx->forceComposition = value; + break; + default: LOGE("In hwc:perform UNKNOWN EVENT = %d!!", event); break; diff --git a/libqcomui/qcom_ui.h b/libqcomui/qcom_ui.h index f78650c..16923b9 100644 --- a/libqcomui/qcom_ui.h +++ b/libqcomui/qcom_ui.h @@ -128,6 +128,7 @@ enum { EVENT_CLOSE_SECURE_END, // End of secure session teardown config EVENT_RESET_POSTBUFFER, // Reset post framebuffer mutex EVENT_WAIT_POSTBUFFER, // Wait until post framebuffer returns + EVENT_FORCE_COMPOSITION, // On/Off event for avoiding skip composition }; // Video information sent to framebuffer HAl