From 68960283c2f84e369c580ab43dfda9e5565b7b2d Mon Sep 17 00:00:00 2001 From: Tao Dong Date: Thu, 14 Dec 2017 06:26:21 +0000 Subject: Merge "hwc2: add omx sideband case when close/open video layer" into o-amlogic --- diff --git a/hwc2/common/devices/PhysicalDevice.cpp b/hwc2/common/devices/PhysicalDevice.cpp index c00a46c..bfd535f 100644 --- a/hwc2/common/devices/PhysicalDevice.cpp +++ b/hwc2/common/devices/PhysicalDevice.cpp @@ -1256,7 +1256,7 @@ int32_t PhysicalDevice::preValidate() { bool bScale = (mReverseScaleX >= 0.01f && mReverseScaleX >= 0.01f) ? true : false; HwcLayer* layer = NULL; int videoPresentFlags = 0; //0: no video, 1: video presetn, 2: omx video present; - + mOmxSideBandPresent = false; //find out video layer first. for (uint32_t i=0; igetCompositionType() == HWC2_COMPOSITION_SIDEBAND) { + //ALOGD("SIDEBAND"); + mOmxSideBandPresent = true; + } if (hnd && (hnd->flags & private_handle_t::PRIV_FLAGS_VIDEO_OMX)) { videoPresentFlags = 2; } else if (hnd && (hnd->flags & private_handle_t::PRIV_FLAGS_VIDEO_OVERLAY)) { @@ -1423,8 +1426,8 @@ int32_t PhysicalDevice::validateDisplay(uint32_t* outNumTypes, if (mOmxKeepLastFrame == 1) { int is_disable_video = -1; AmVideo::getInstance()->getvideodisable(&is_disable_video); - //ALOGD("is_disable_video %d, mOmxVideoPresent %d",is_disable_video,mOmxVideoPresent); - if (mOmxVideoPresent) { + //ALOGD("is_disable_video %d, mOmxVideoPresent %d, mOmxSideBandPresent %d, mVideoLayerOpenByOMX %d",is_disable_video,mOmxVideoPresent,mOmxSideBandPresent,mVideoLayerOpenByOMX); + if (mOmxVideoPresent || mOmxSideBandPresent) { //enable video layer if (is_disable_video == 1) { ALOGI("video layer present, enable video layer"); diff --git a/hwc2/include/PhysicalDevice.h b/hwc2/include/PhysicalDevice.h index 6c5fa5c..762f5cc 100644 --- a/hwc2/include/PhysicalDevice.h +++ b/hwc2/include/PhysicalDevice.h @@ -294,6 +294,7 @@ private: bool mOmxVideoPresent; uint32_t mOmxKeepLastFrame; bool mVideoLayerOpenByOMX; + bool mOmxSideBandPresent; }; -- cgit