hwc: Check for planeAlpha along with HWC_BLENDING_NONE

Check for planeAlpha along with HWC_BLENDING_NONE as the latter
is set if the layer is Opaque irrespective of planeAlpha value.

Change-Id: Iaee7efe662189ba3a2562f79c2d109da831ac94d
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 9872049..64ef64a 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -532,7 +532,8 @@
             }
 
             /* deduct any opaque region from visibleRect */
-            if (layer->blending == HWC_BLENDING_NONE)
+            if (layer->blending == HWC_BLENDING_NONE &&
+                    layer->planeAlpha == 0xFF)
                 visibleRect = deductRect(visibleRect, res);
         }
     }
@@ -638,7 +639,8 @@
                 return false;
             }
 
-            if (layer->blending == HWC_BLENDING_NONE) {
+            if (layer->blending == HWC_BLENDING_NONE &&
+                    layer->planeAlpha == 0xFF) {
                 visibleRectL = deductRect(visibleRectL, l_res);
                 visibleRectR = deductRect(visibleRectR, r_res);
             }