hqd: vds: Use aligned width/height to detect need for MDP scaling

Use aligned width and height to check whether we need mdp scaling
for WFD use-case.

Change-Id: I8bbb0b9fb6ccec9f9798f37f9ea6ca38f69792c0
diff --git a/libhwcomposer/hwc_virtual.cpp b/libhwcomposer/hwc_virtual.cpp
index 06418bf..a294a75 100644
--- a/libhwcomposer/hwc_virtual.cpp
+++ b/libhwcomposer/hwc_virtual.cpp
@@ -223,13 +223,15 @@
         private_handle_t* ohnd, int dpy) {
     bool scalingMode = false;
     int fbWidth = ctx->dpyAttr[dpy].xres;
-    int fbHeight =  ctx->dpyAttr[dpy].yres;
-    if((getWidth(ohnd) != fbWidth) || (getHeight(ohnd) != fbHeight)) {
+    int fbHeight = ctx->dpyAttr[dpy].yres;
+    int alW = 0, alH = 0;
+    getBufferSizeAndDimensions(fbWidth, fbHeight, ohnd->format, alW, alH);
+    if((getWidth(ohnd) != alW) || (getHeight(ohnd) != alH)) {
         scalingMode = true;
     }
     ctx->dpyAttr[dpy].mMDPScalingMode = scalingMode;
 
     ALOGD_IF(HWCVIRTUAL_LOG, "%s fb(%dx%d) outputBuffer(%dx%d) scalingMode=%d",
-            __FUNCTION__, fbWidth, fbHeight,
+            __FUNCTION__, alW, alH,
             getWidth(ohnd), getHeight(ohnd), scalingMode);
 }