Copy virtual display FB to outbuf even with no app layers

Bug: 11676429
Change-Id: I971a2374baf03354afb5918b84f6fd68e1ff29c0
diff --git a/msm8974/libhwcomposer/hwc.cpp b/msm8974/libhwcomposer/hwc.cpp
index 87ec5c7..1e61946 100644
--- a/msm8974/libhwcomposer/hwc.cpp
+++ b/msm8974/libhwcomposer/hwc.cpp
@@ -213,7 +213,7 @@
     hwc_context_t* ctx = (hwc_context_t*)(dev);
     const int dpy = HWC_DISPLAY_VIRTUAL;
 
-    if (list && list->outbuf && list->numHwLayers > 1) {
+    if (list && list->outbuf && list->numHwLayers > 0) {
         reset_layer_prop(ctx, dpy, list->numHwLayers - 1);
         uint32_t last = list->numHwLayers - 1;
         hwc_layer_1_t *fbLayer = &list->hwLayers[last];
@@ -495,7 +495,7 @@
     int ret = 0;
     const int dpy = HWC_DISPLAY_VIRTUAL;
 
-    if (list && list->outbuf && list->numHwLayers > 1) {
+    if (list && list->outbuf && list->numHwLayers > 0) {
         uint32_t last = list->numHwLayers - 1;
         hwc_layer_1_t *fbLayer = &list->hwLayers[last];