summaryrefslogtreecommitdiff
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 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");