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
This commit is contained in:
@@ -177,13 +177,13 @@ void VirtualDisplay::setAttributes() {
|
|||||||
uint32_t priW = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].xres;
|
uint32_t priW = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].xres;
|
||||||
uint32_t priH = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].yres;
|
uint32_t priH = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].yres;
|
||||||
|
|
||||||
initResolution(extW, extH);
|
|
||||||
|
|
||||||
// Dynamic Resolution Change depends on MDP downscaling.
|
// Dynamic Resolution Change depends on MDP downscaling.
|
||||||
// MDP downscale property will be ignored to exercise DRC use case.
|
// MDP downscale property will be ignored to exercise DRC use case.
|
||||||
// If DRC is in progress, ext WxH will have non-zero values.
|
// If DRC is in progress, ext WxH will have non-zero values.
|
||||||
bool isDRC = (extW > 0) && (extH > 0);
|
bool isDRC = (extW > 0) && (extH > 0);
|
||||||
|
|
||||||
|
initResolution(extW, extH);
|
||||||
|
|
||||||
if(!qdutils::MDPVersion::getInstance().is8x26()
|
if(!qdutils::MDPVersion::getInstance().is8x26()
|
||||||
&& (mHwcContext->mMDPDownscaleEnabled || isDRC)) {
|
&& (mHwcContext->mMDPDownscaleEnabled || isDRC)) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user