hwc: Add padding round on virtual display
This makes sure pipes are detached from the primary display when
a virtual display comes in so that there is a chance of the
virtual display getting at least one pipe.
Change-Id: I34e11a05385555ca18b7f2d16bd429819f4ca689
diff --git a/libhwcomposer/hwc_virtual.cpp b/libhwcomposer/hwc_virtual.cpp
index 61e88c8..06418bf 100644
--- a/libhwcomposer/hwc_virtual.cpp
+++ b/libhwcomposer/hwc_virtual.cpp
@@ -91,9 +91,9 @@
ctx->dpyAttr[dpy].vsync_period
= ctx->dpyAttr[HWC_DISPLAY_PRIMARY].vsync_period;
init(ctx);
- // XXX: for architectures with limited resources we would normally
- // allow one padding round to free up resources but this breaks
- // certain use cases.
+ // Do one padding round for cases where primary has all pipes
+ // The virtual composition falls back to GPU in such cases.
+ ctx->isPaddingRound = true;
}
if(!ctx->dpyAttr[dpy].isPause) {
ctx->dpyAttr[dpy].isConfiguring = false;