hwc: source split: Enable BWC for video with width <= mixer width
Enable BWC for videos with crop and position widths <= mixer width.
Source split was earlier used on split panels only, and BWC was
never enabled (It should at least have been for eligible content).
When source split was enabled for all panels, automatically BWC got
disabled for rotated videos. This change fixes that.
Change-Id: I349e782fb6de515ff42fcb137f02cf27c425da56
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 540a8e7..b75af03 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -2028,6 +2028,10 @@
(*rot) = ctx->mRotMgr->getNext();
if((*rot) == NULL) return -1;
ctx->mLayerRotMap[mDpy]->add(layer, *rot);
+ //If the video is using a single pipe, enable BWC
+ if(rDest == OV_INVALID) {
+ BwcPM::setBwc(crop, dst, transform, mdpFlags);
+ }
//Configure rotator for pre-rotation
if(configRotator(*rot, whf, crop, mdpFlags, orient, downscale) < 0) {
ALOGE("%s: configRotator failed!", __FUNCTION__);