Merge "hwc: Check for planeAlpha along with HWC_BLENDING_NONE"
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index a2a5f2d..d006415 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);
}
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 51e23de..916fbc7 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -1383,7 +1383,8 @@
//see if there is no blending required.
//If it is opaque see if we can substract this region from below
//layers.
- if(list->hwLayers[i].blending == HWC_BLENDING_NONE) {
+ if(list->hwLayers[i].blending == HWC_BLENDING_NONE &&
+ list->hwLayers[i].planeAlpha == 0xFF) {
int j= i-1;
hwc_rect_t& topframe =
(hwc_rect_t&)list->hwLayers[i].displayFrame;