diff --git a/libhwcomposer/hwcomposer.cpp b/libhwcomposer/hwcomposer.cpp index d52686d..0190a59 100644 --- a/libhwcomposer/hwcomposer.cpp +++ b/libhwcomposer/hwcomposer.cpp @@ -406,11 +406,14 @@ inline static bool isBypassDoable(hwc_composer_device_t *dev, const int yuvCount return false; } - //Bypass is not efficient if rotation is needed. + //Bypass is not efficient if rotation or asynchronous mode is needed. for(int i = 0; i < list->numHwLayers; ++i) { if(list->hwLayers[i].transform) { return false; } + if(list->hwLayers[i].flags & HWC_LAYER_ASYNCHRONOUS) { + return false; + } } return (yuvCount == 0) && (ctx->hwcOverlayStatus == HWC_OVERLAY_CLOSED) diff --git a/libqcomui/qcom_ui.cpp b/libqcomui/qcom_ui.cpp index 502a651..6bc4eed 100644 --- a/libqcomui/qcom_ui.cpp +++ b/libqcomui/qcom_ui.cpp @@ -354,6 +354,12 @@ int updateLayerQcomFlags(eLayerAttrib attribute, bool enable, int& currentFlags) else currentFlags &= ~LAYER_UPDATING; } break; + case LAYER_ASYNCHRONOUS_STATUS: { + if (enable) + currentFlags |= LAYER_ASYNCHRONOUS; + else + currentFlags &= ~LAYER_ASYNCHRONOUS; + } break; default: LOGE("%s: invalid attribute(0x%x)", __FUNCTION__, attribute); break; } @@ -375,6 +381,11 @@ int getPerFrameFlags(int hwclFlags, int layerFlags) { else flags |= HWC_LAYER_NOT_UPDATING; + if (layerFlags & LAYER_ASYNCHRONOUS) + flags |= HWC_LAYER_ASYNCHRONOUS; + else + flags &= ~HWC_LAYER_ASYNCHRONOUS; + return flags; } diff --git a/libqcomui/qcom_ui.h b/libqcomui/qcom_ui.h index 6cad8ed..b1fe853 100644 --- a/libqcomui/qcom_ui.h +++ b/libqcomui/qcom_ui.h @@ -67,13 +67,15 @@ enum { */ enum eLayerAttrib { LAYER_UPDATE_STATUS, + LAYER_ASYNCHRONOUS_STATUS, }; /* * Layer Flags */ enum { - LAYER_UPDATING = 1<<0, + LAYER_UPDATING = 1<<0, + LAYER_ASYNCHRONOUS = 1<<1, }; /* @@ -81,6 +83,7 @@ enum { */ enum { HWC_LAYER_NOT_UPDATING = 0x00000002, + HWC_LAYER_ASYNCHRONOUS = 0x00000004, HWC_USE_ORIGINAL_RESOLUTION = 0x10000000, HWC_DO_NOT_USE_OVERLAY = 0x20000000, HWC_COMP_BYPASS = 0x40000000,