From 691a7f459aab9ada52edaa1adbc46a9ec708cbbe Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 15 Nov 2011 21:37:27 -0800 Subject: fix an issue in hwc where the overlay wouldn't be re-composited if it didn't change this logic is flawed because something else under or over it could have changed and since we're using a blit engine, the frame needs to be blitted again. Change-Id: Id2b52d0b5d58cb9274130dd71cbbbd559b6ac1df --- libhwcomposer/SecHWC.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'libhwcomposer') diff --git a/libhwcomposer/SecHWC.cpp b/libhwcomposer/SecHWC.cpp index 4808470..140a23e 100644 --- a/libhwcomposer/SecHWC.cpp +++ b/libhwcomposer/SecHWC.cpp @@ -317,11 +317,6 @@ static int hwc_set(hwc_composer_device_t *dev, cur = &list->hwLayers[win->layer_index]; if (cur->compositionType == HWC_OVERLAY) { - /* Skip duplicate frame rendering */ - if (win->layer_prev_buf == (uint32_t)cur->handle) - continue; - - win->layer_prev_buf = (uint32_t)cur->handle; ret = gpsGrallocModule->GetPhyAddrs(gpsGrallocModule, cur->handle, phyAddr); @@ -354,9 +349,15 @@ static int hwc_set(hwc_composer_device_t *dev, win->set_win_flag = 0; } - window_pan_display(win); - - win->buf_index = (win->buf_index + 1) % NUM_OF_WIN_BUF; + /* is the frame didn't change, it needs to be composited + * because something else below it could have changed, however + * it doesn't need to be swapped. + */ + if (win->layer_prev_buf != (uint32_t)cur->handle) { + win->layer_prev_buf = (uint32_t)cur->handle; + window_pan_display(win); + win->buf_index = (win->buf_index + 1) % NUM_OF_WIN_BUF; + } if(win->power_state == 0) window_show(win); -- cgit v1.1