diff options
| author | 2012-02-03 17:22:09 -0800 | |
|---|---|---|
| committer | 2012-02-03 17:22:09 -0800 | |
| commit | c9ca7011501cb8730ce4e6e527cb402adb7a0178 (patch) | |
| tree | dcc74a70df677f76b856f44958c6cc951544cd71 | |
| parent | 1d7264e9bda08f88f0067c4456ce39f66149e4ca (diff) | |
attempt to fix an ANR in various apps
recent changes in SF introduced a hang where some windows would
stop being refreshed.
This is an attemp to fix that.
Change-Id: I6aa32ac0d6f1c0a6aea8f6195825dc4f4e6f93f9
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 870235bffa..ee37efb034 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -425,12 +425,12 @@ void SurfaceFlinger::onMessageReceived(int32_t what) } break; case MessageQueue::REFRESH: { - if (!mDirtyRegion.isEmpty()) { - // NOTE: it is mandatory to call hw.compositionComplete() - // after handleRefresh() - handleRefresh(); + // NOTE: it is mandatory to call hw.compositionComplete() + // after handleRefresh() + const DisplayHardware& hw(graphicPlane(0).displayHardware()); + handleRefresh(); - const DisplayHardware& hw(graphicPlane(0).displayHardware()); + if (!mDirtyRegion.isEmpty()) { if (CC_UNLIKELY(mHwWorkListDirty)) { // build the h/w work list handleWorkList(); @@ -445,6 +445,8 @@ void SurfaceFlinger::onMessageReceived(int32_t what) // pretend we did the post hw.compositionComplete(); } + } else { + hw.compositionComplete(); } } break; } |