hwc: Add support for EXT_ONLY Layers
If there are any EXTERNAL_ONLY layers present in the list, mark
them as HWC_OVERLAY such that SF does not compose and in hwc_set
post that layer to Ext display, ignore other layers
Change-Id: Ic5db3bfa88295167d23d1fb2be7640c9fc772054
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 7398295..9dd95ff 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -425,12 +425,18 @@
ret = -1;
}
+ int extOnlyLayerIndex =
+ ctx->listStats[dpy].extOnlyLayerIndex;
+
private_handle_t *hnd = (private_handle_t *)fbLayer->handle;
- if(copybitDone) {
+ if(extOnlyLayerIndex!= -1) {
+ hwc_layer_1_t *extLayer = &list->hwLayers[extOnlyLayerIndex];
+ hnd = (private_handle_t *)extLayer->handle;
+ } else if(copybitDone) {
hnd = ctx->mCopyBit[dpy]->getCurrentRenderBuffer();
}
- if(hnd) {
+ if(hnd && !isYuvBuffer(hnd)) {
if (!ctx->mFBUpdate[dpy]->draw(ctx, hnd)) {
ALOGE("%s: FBUpdate::draw fail!", __FUNCTION__);
ret = -1;