hwc: Do not include Framebuffer area in calculating total area
In dynamic composition, While calculating total render area of
application layers to decide on which composition to choose,
FrameBuffer layer area shall not be added to the total render area.
Change-Id: Ibfa23130864ebae514ab94e75813bfaa4a61528c
diff --git a/libhwcomposer/hwc_copybit.cpp b/libhwcomposer/hwc_copybit.cpp
index 3f40753..3256607 100644
--- a/libhwcomposer/hwc_copybit.cpp
+++ b/libhwcomposer/hwc_copybit.cpp
@@ -120,7 +120,9 @@
//Calculates total rendering area for RGB layers
unsigned int renderArea = 0;
unsigned int w=0, h=0;
- for (unsigned int i=0; i<list->numHwLayers; i++) {
+ // Skipping last layer since FrameBuffer layer should not affect
+ // which composition to choose
+ for (unsigned int i=0; i<list->numHwLayers -1; i++) {
private_handle_t *hnd = (private_handle_t *)list->hwLayers[i].handle;
if (hnd) {
if (BUFFER_TYPE_UI == hnd->bufferType) {