diff options
author | Mathias Agopian <mathias@google.com> | 2011-11-17 07:48:25 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-17 07:48:25 -0800 |
commit | 362bce5d3fdba3197cb0137b6595a2bf1216436b (patch) | |
tree | ba28e6d6dc6c13a4a5aca5b5027662d7a0a1a447 /libhwcomposer | |
parent | 20110d1bf9d9a33b8cbd9c6cb1953e215c607e55 (diff) | |
parent | a93fc4fef1332ed8fe69f30d0474fefaf55f31bb (diff) | |
download | device_samsung_crespo-362bce5d3fdba3197cb0137b6595a2bf1216436b.zip device_samsung_crespo-362bce5d3fdba3197cb0137b6595a2bf1216436b.tar.gz device_samsung_crespo-362bce5d3fdba3197cb0137b6595a2bf1216436b.tar.bz2 |
am a93fc4fe: Merge "fix an issue in hwc where the overlay wouldn\'t be re-composited if it didn\'t change" into ics-mr1
* commit 'a93fc4fef1332ed8fe69f30d0474fefaf55f31bb':
fix an issue in hwc where the overlay wouldn't be re-composited if it didn't change
Diffstat (limited to 'libhwcomposer')
-rw-r--r-- | libhwcomposer/SecHWC.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libhwcomposer/SecHWC.cpp b/libhwcomposer/SecHWC.cpp index 30305ad..6488a48 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); |