author | Tao Dong <tao.dong@amlogic.com> | 2017-12-14 06:26:21 (GMT) |
---|---|---|
committer | Gerrit Code Review <gituser@scgit.amlogic.com> | 2017-12-14 06:26:21 (GMT) |
commit | 68960283c2f84e369c580ab43dfda9e5565b7b2d (patch) | |
tree | f479e101c6a372b234642d0e3d01a5ea2d97425e | |
parent | f8dfd7c4097c5c3586a9cf62f26861c400c6a2cc (diff) | |
parent | 6bb38771621275bf0e5d9fe8c503f7d39c5abee3 (diff) | |
download | hwcomposer-68960283c2f84e369c580ab43dfda9e5565b7b2d.zip hwcomposer-68960283c2f84e369c580ab43dfda9e5565b7b2d.tar.gz hwcomposer-68960283c2f84e369c580ab43dfda9e5565b7b2d.tar.bz2 |
Merge "hwc2: add omx sideband case when close/open video layer" into o-amlogic
-rw-r--r-- | hwc2/common/devices/PhysicalDevice.cpp | 11 | ||||
-rw-r--r-- | hwc2/include/PhysicalDevice.h | 1 |
2 files changed, 8 insertions, 4 deletions
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; i<mHwcLayers.size(); i++) { hwc2_layer_t layerId = mHwcLayers.keyAt(i); @@ -1284,7 +1284,10 @@ int32_t PhysicalDevice::preValidate() { } mVideoOverlayLayerId = layerId; } - + if (layer->getCompositionType() == 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; }; |