hwc: vd: Add support for Dynamic Resolution Change (DRC)
1. Add support for Dynamic Resolution Change
We add support for DRC on virtual displays. This is achieved
by reading the width and height attributes that are set as
part of the buffer handle metadata.
For the WFD use cases, the WFD MultiMedia framework will
update the width and height during DRC by using setMetaData
API with UPDATE_BUFFER_GEOMETRY. We then proceed to configure
WB with the new resolution for subsequent frames.
2. Update WB dump with output buffer format and resolution
Update WB dump with output buffer format and resolution. This is
helpful for debugging purposes.
Change-Id: I537277499041bffc7bfc5c6e3d024b67f80fce44
diff --git a/libhwcomposer/hwc_fbupdate.cpp b/libhwcomposer/hwc_fbupdate.cpp
index d5139f4..7839139 100644
--- a/libhwcomposer/hwc_fbupdate.cpp
+++ b/libhwcomposer/hwc_fbupdate.cpp
@@ -182,11 +182,11 @@
// Do not use getNonWormholeRegion() function to calculate the
// sourceCrop during animation on external display and
// Dont do wormhole calculation when extorientation is set on External
- // Dont do wormhole calculation when extDownscale is enabled on External
+ // Dont do wormhole calculation when scaling mode is set on External
if(ctx->listStats[mDpy].isDisplayAnimating && mDpy) {
sourceCrop = layer->displayFrame;
} else if((mDpy && !extOrient
- && !ctx->dpyAttr[mDpy].mDownScaleMode)) {
+ && !ctx->dpyAttr[mDpy].mMDPScalingMode)) {
if(ctx->mOverlay->isUIScalingOnExternalSupported() &&
!ctx->dpyAttr[mDpy].customFBSize) {
getNonWormholeRegion(list, sourceCrop);
@@ -307,11 +307,11 @@
// Do not use getNonWormholeRegion() function to calculate the
// sourceCrop during animation on external display and
// Dont do wormhole calculation when extorientation is set on External
- // Dont do wormhole calculation when extDownscale is enabled on External
+ // Dont do wormhole calculation when scaling mode is set on External
if(ctx->listStats[mDpy].isDisplayAnimating && mDpy) {
sourceCrop = layer->displayFrame;
} else if((mDpy && !extOrient
- && !ctx->dpyAttr[mDpy].mDownScaleMode)) {
+ && !ctx->dpyAttr[mDpy].mMDPScalingMode)) {
if(!qdutils::MDPVersion::getInstance().is8x26() &&
!ctx->dpyAttr[mDpy].customFBSize) {
getNonWormholeRegion(list, sourceCrop);
@@ -473,11 +473,11 @@
// Do not use getNonWormholeRegion() function to calculate the
// sourceCrop during animation on external display and
// Dont do wormhole calculation when extorientation is set on External
- // Dont do wormhole calculation when extDownscale is enabled on External
+ // Dont do wormhole calculation when scaling mode is set on External
if(ctx->listStats[mDpy].isDisplayAnimating && mDpy) {
sourceCrop = layer->displayFrame;
} else if((mDpy && !extOrient
- && !ctx->dpyAttr[mDpy].mDownScaleMode)) {
+ && !ctx->dpyAttr[mDpy].mMDPScalingMode)) {
if(!qdutils::MDPVersion::getInstance().is8x26() &&
!ctx->dpyAttr[mDpy].customFBSize) {
getNonWormholeRegion(list, sourceCrop);