From 0f59a5a6a4fea63b29f45d1f765f378231edadf4 Mon Sep 17 00:00:00 2001 From: Tatenda Chipeperekwa Date: Wed, 26 Mar 2014 10:33:29 -0700 Subject: [PATCH] libvirtual: Fix logic to detect DRC use case We detect DRC based on the resolution of the external display. If the external display has non-zero width/height then we know it was previously configured during the same session and is going for DRC. Change-Id: Iaa0b112370a95f2719738c991411776dcfe17f88 --- libvirtual/virtual.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirtual/virtual.cpp b/libvirtual/virtual.cpp index 5453e3a9..ca64fad6 100644 --- a/libvirtual/virtual.cpp +++ b/libvirtual/virtual.cpp @@ -177,13 +177,13 @@ void VirtualDisplay::setAttributes() { uint32_t priW = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].xres; uint32_t priH = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].yres; - initResolution(extW, extH); - // Dynamic Resolution Change depends on MDP downscaling. // MDP downscale property will be ignored to exercise DRC use case. // If DRC is in progress, ext WxH will have non-zero values. bool isDRC = (extW > 0) && (extH > 0); + initResolution(extW, extH); + if(!qdutils::MDPVersion::getInstance().is8x26() && (mHwcContext->mMDPDownscaleEnabled || isDRC)) {