Merge "hwc: Modify MDPOnly composition to allow only secure RGB layers"
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 569f5d1..0661d5f 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2014, The Linux Foundation. All rights reserved.
+ * Copyright (C) 2012-2015, The Linux Foundation. All rights reserved.
* Not a Contribution, Apache license notifications and license are retained
* for attribution purposes only.
*
@@ -1387,6 +1387,12 @@
}
}
+ /* Bail out if we dont have any secure RGB layers */
+ if (!ctx->listStats[mDpy].secureRGBCount) {
+ reset(ctx);
+ return false;
+ }
+
mCurrentFrame.reset(numAppLayers);
mCurrentFrame.fbCount -= mCurrentFrame.dropCount;