libvirtual: Fix logic to detect DRC use case.
We detect DRC based on the resolution of the external display stored in the HAL, and the dimensions of the framebuffer(fb2) after receiving a RESUME event. If the stored resolution is greater than that of fb2 it means fb2 was reconfigured due to DRC. This is the only case in which we trigger the DRC path (and the MDP downscale path thereafter). For all other cases, the RESUME event is just treated as normal and should not result in triggering the DRC path. Change-Id: I2c8a854434f09a840938f00b88faa59c6cb57e7f
This commit is contained in:
@@ -177,12 +177,12 @@ 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 > mVInfo.xres) && (extH > mVInfo.yres);
|
||||||
|
|
||||||
|
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