Merge "Tell HWComposer the dimensions of virtual displays" into jb-mr2-dev
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
index d2b3edb..7e14d95 100644
--- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
@@ -76,7 +76,11 @@
     if (result != NO_ERROR)
         return result;
 
-    return mHwc.fbPost(mDisplayId, fence, mAcquiredBuffer);
+    result = mHwc.fbPost(mDisplayId, fence, mAcquiredBuffer);
+    if (result == NO_ERROR) {
+        result = mHwc.setOutputBuffer(mDisplayId, fence, mAcquiredBuffer);
+    }
+    return result;
 }
 
 void VirtualDisplaySurface::onFrameCommitted() {