summaryrefslogtreecommitdiffstats
path: root/libhwcomposer
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-11-16 18:16:41 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-11-16 18:16:41 -0800
commita93fc4fef1332ed8fe69f30d0474fefaf55f31bb (patch)
tree7dc7d7dc93bd3a84eeb4f7968dd42dbc4187e04f /libhwcomposer
parentd0384ace5fb11589462aa075313a29f9539c1cc7 (diff)
parent691a7f459aab9ada52edaa1adbc46a9ec708cbbe (diff)
downloaddevice_samsung_crespo-a93fc4fef1332ed8fe69f30d0474fefaf55f31bb.zip
device_samsung_crespo-a93fc4fef1332ed8fe69f30d0474fefaf55f31bb.tar.gz
device_samsung_crespo-a93fc4fef1332ed8fe69f30d0474fefaf55f31bb.tar.bz2
Merge "fix an issue in hwc where the overlay wouldn't be re-composited if it didn't change" into ics-mr1
Diffstat (limited to 'libhwcomposer')
-rw-r--r--libhwcomposer/SecHWC.cpp17
1 files changed, 9 insertions, 8 deletions
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);