summaryrefslogtreecommitdiffstats
path: root/libhwcomposer
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-11-15 21:37:27 -0800
committerMathias Agopian <mathias@google.com>2011-11-16 16:13:03 -0800
commit691a7f459aab9ada52edaa1adbc46a9ec708cbbe (patch)
tree65771ac81d768c06b8f71de21225946dbe235a6e /libhwcomposer
parent8aeda4f376fcbf9758f44f4ed6ce2b8eddfc7e05 (diff)
downloaddevice_samsung_crespo-691a7f459aab9ada52edaa1adbc46a9ec708cbbe.zip
device_samsung_crespo-691a7f459aab9ada52edaa1adbc46a9ec708cbbe.tar.gz
device_samsung_crespo-691a7f459aab9ada52edaa1adbc46a9ec708cbbe.tar.bz2
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
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);