summaryrefslogtreecommitdiff
authorYao.Liu <yao.liu@amlogic.com>2017-12-12 13:20:38 (GMT)
committer Yao.Liu <yao.liu@amlogic.com>2017-12-12 13:32:13 (GMT)
commit6bb38771621275bf0e5d9fe8c503f7d39c5abee3 (patch)
tree396d4e0fe0cc1541c175f531a29cf0025092b692
parentc01fd6a29b4ac31c5484440809d0726a9651fde2 (diff)
downloadhwcomposer-6bb38771621275bf0e5d9fe8c503f7d39c5abee3.zip
hwcomposer-6bb38771621275bf0e5d9fe8c503f7d39c5abee3.tar.gz
hwcomposer-6bb38771621275bf0e5d9fe8c503f7d39c5abee3.tar.bz2
hwc2: add omx sideband case when close/open video layer
PD#156676 Change-Id: I06043f30cacb8ff6dfe266fd752cd3924282755f Signed-off-by: Yao.Liu <yao.liu@amlogic.com>
Diffstat
-rw-r--r--hwc2/common/devices/PhysicalDevice.cpp11
-rw-r--r--hwc2/include/PhysicalDevice.h1
2 files changed, 8 insertions, 4 deletions
diff --git a/hwc2/common/devices/PhysicalDevice.cpp b/hwc2/common/devices/PhysicalDevice.cpp
index 338b83a..e71f6f5 100644
--- a/hwc2/common/devices/PhysicalDevice.cpp
+++ b/hwc2/common/devices/PhysicalDevice.cpp
@@ -1254,7 +1254,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);
@@ -1282,7 +1282,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)) {
@@ -1421,8 +1424,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;
};