Merge "hwc: Add assertive display support."

This commit is contained in:
Linux Build Service Account
2013-08-14 01:08:09 -07:00
committed by Gerrit - the friendly Code Review server
9 changed files with 395 additions and 2 deletions

View File

@@ -27,9 +27,11 @@
#include <gralloc_priv.h>
#include <overlay.h>
#include <overlayRotator.h>
#include <overlayWriteback.h>
#include "hwc_utils.h"
#include "hwc_mdpcomp.h"
#include "hwc_fbupdate.h"
#include "hwc_ad.h"
#include "mdp_version.h"
#include "hwc_copybit.h"
#include "hwc_dump_layers.h"
@@ -161,6 +163,7 @@ void initContext(hwc_context_t *ctx)
}
MDPComp::init(ctx);
ctx->mAD = new AssertiveDisplay();
ctx->vstate.enable = false;
ctx->vstate.fakevsync = false;
@@ -234,6 +237,10 @@ void closeContext(hwc_context_t *ctx)
ctx->mLayerRotMap[i] = NULL;
}
}
if(ctx->mAD) {
delete ctx->mAD;
ctx->mAD = NULL;
}
}
@@ -475,6 +482,9 @@ void setListStats(hwc_context_t *ctx,
if(prevYuvCount != ctx->listStats[dpy].yuvCount) {
ctx->mVideoTransFlag = true;
}
if(dpy == HWC_DISPLAY_PRIMARY) {
ctx->mAD->markDoable(ctx, list);
}
}
@@ -991,6 +1001,13 @@ int configureLowRes(hwc_context_t *ctx, hwc_layer_1_t *layer,
setMdpFlags(layer, mdpFlags, downscale, transform);
trimLayer(ctx, dpy, transform, crop, dst);
//Will do something only if feature enabled and conditions suitable
//hollow call otherwise
if(ctx->mAD->prepare(ctx, crop, whf, hnd)) {
overlay::Writeback *wb = overlay::Writeback::getInstance();
whf.format = wb->getOutputFormat();
}
if(isYuvBuffer(hnd) && //if 90 component or downscale, use rot
((transform & HWC_TRANSFORM_ROT_90) || downscale)) {
*rot = ctx->mRotMgr->getNext();
@@ -1069,6 +1086,13 @@ int configureHighRes(hwc_context_t *ctx, hwc_layer_1_t *layer,
setMdpFlags(layer, mdpFlagsL, 0, transform);
trimLayer(ctx, dpy, transform, crop, dst);
//Will do something only if feature enabled and conditions suitable
//hollow call otherwise
if(ctx->mAD->prepare(ctx, crop, whf, hnd)) {
overlay::Writeback *wb = overlay::Writeback::getInstance();
whf.format = wb->getOutputFormat();
}
if(isYuvBuffer(hnd) && (transform & HWC_TRANSFORM_ROT_90)) {
(*rot) = ctx->mRotMgr->getNext();
if((*rot) == NULL) return -1;