Merge "hwc: Implement idle-fallback for videos"

This commit is contained in:
Linux Build Service Account
2013-05-17 06:43:50 -07:00
committed by Gerrit - the friendly Code Review server
2 changed files with 8 additions and 7 deletions

View File

@@ -235,7 +235,6 @@ static int hwc_prepare(hwc_composer_device_1 *dev, size_t numDisplays,
ctx->mOverlay->configDone();
ctx->mRotMgr->configDone();
MDPComp::resetIdleFallBack();
return ret;
}
@@ -498,6 +497,7 @@ static int hwc_set(hwc_composer_device_1 *dev,
// This is only indicative of how many times SurfaceFlinger posts
// frames to the display.
CALC_FPS();
MDPComp::resetIdleFallBack();
return ret;
}

View File

@@ -366,11 +366,7 @@ bool MDPComp::isFrameDoable(hwc_context_t *ctx) {
ctx->isPaddingRound = false;
ALOGD_IF(isDebug(), "%s: padding round",__FUNCTION__);
ret = false;
} else if(sIdleFallBack) {
ALOGD_IF(isDebug(), "%s: idle fallback",__FUNCTION__);
ret = false;
}
return ret;
}
@@ -381,6 +377,11 @@ bool MDPComp::isFullFrameDoable(hwc_context_t *ctx,
const int numAppLayers = ctx->listStats[mDpy].numAppLayers;
if(sIdleFallBack) {
ALOGD_IF(isDebug(), "%s: Idle fallback dpy %d",__FUNCTION__, mDpy);
return false;
}
if(mDpy > HWC_DISPLAY_PRIMARY){
ALOGD_IF(isDebug(), "%s: Cannot support External display(s)",
__FUNCTION__);
@@ -856,7 +857,7 @@ bool MDPCompLowRes::draw(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
}
/* reset Invalidator */
if(idleInvalidator && mCurrentFrame.mdpCount)
if(idleInvalidator && !sIdleFallBack && mCurrentFrame.mdpCount)
idleInvalidator->markForSleep();
overlay::Overlay& ov = *ctx->mOverlay;
@@ -1024,7 +1025,7 @@ bool MDPCompHighRes::draw(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
}
/* reset Invalidator */
if(idleInvalidator && mCurrentFrame.mdpCount)
if(idleInvalidator && !sIdleFallBack && mCurrentFrame.mdpCount)
idleInvalidator->markForSleep();
overlay::Overlay& ov = *ctx->mOverlay;