unsigned int CopyBit::getRGBRenderingArea(const hwc_display_contents_1_t *list) {
    //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++) {
         private_handle_t *hnd = (private_handle_t *)list->hwLayers[i].handle;
         if (hnd) {
             if (BUFFER_TYPE_UI == hnd->bufferType) {
                 getLayerResolution(&list->hwLayers[i], w, h);
                 renderArea += (w*h);
             }
         }
    }
    return renderArea;
}
unsigned int CopyBit::getRGBRenderingArea
                                    (const hwc_display_contents_1_t *list) {
    //Calculates total rendering area for RGB layers
    unsigned int renderArea = 0;
    unsigned int w=0, h=0;
    // Skipping last layer since FrameBuffer layer should not affect
    // which composition to choose
    for (unsigned int i=0; i<list->numHwLayers - 1; i++) {
        if (list->hwLayers[i].compositionType == HWC_FRAMEBUFFER) {
            private_handle_t *hnd = (private_handle_t *)list->hwLayers[i].handle;
            if (hnd) {
                if (BUFFER_TYPE_UI == hnd->bufferType) {
                    getLayerResolution(&list->hwLayers[i], w, h);
                    renderArea += (w*h);
                }
            }
        }
    }
    return renderArea;
}