diff options
| author | 2011-10-16 18:46:35 -0700 | |
|---|---|---|
| committer | 2011-10-16 18:59:38 -0700 | |
| commit | a44b04163957d6086362f6f365443c4c93379031 (patch) | |
| tree | e13bdb8d24230661cf798c1198d01ed2cf794e36 /services/surfaceflinger/SurfaceFlinger.cpp | |
| parent | 1c00a8bdf1612ef0bbe298f4e9a914854297e3aa (diff) | |
we need to guarantee that h/w comp set() is called when a buffer has been retired
removed a test that could violate this guarantee. note that we
have no proof tha this ever happened, but consequences could be
hard lock-ups.
the code here was intended to track the region to update for displays
that can do partial update. the logic discarded the update entirely
if that region was empty. instead we just redraw the whole thing
(note that we should never be there with an empty region and retired
buffers though).
Bug: 5466259
Change-Id: I91ccab3b1a599e729e438eb833939e2236da6854
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 3dccc1130e..76762d0518 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -452,7 +452,7 @@ bool SurfaceFlinger::threadLoop() } const DisplayHardware& hw(graphicPlane(0).displayHardware()); - if (LIKELY(hw.canDraw() && !isFrozen())) { + if (LIKELY(hw.canDraw())) { // repaint the framebuffer (if needed) const int index = hw.getCurrentBufferIndex(); @@ -479,15 +479,13 @@ bool SurfaceFlinger::threadLoop() void SurfaceFlinger::postFramebuffer() { - if (!mSwapRegion.isEmpty()) { - const DisplayHardware& hw(graphicPlane(0).displayHardware()); - const nsecs_t now = systemTime(); - mDebugInSwapBuffers = now; - hw.flip(mSwapRegion); - mLastSwapBufferTime = systemTime() - now; - mDebugInSwapBuffers = 0; - mSwapRegion.clear(); - } + const DisplayHardware& hw(graphicPlane(0).displayHardware()); + const nsecs_t now = systemTime(); + mDebugInSwapBuffers = now; + hw.flip(mSwapRegion); + mLastSwapBufferTime = systemTime() - now; + mDebugInSwapBuffers = 0; + mSwapRegion.clear(); } void SurfaceFlinger::handleConsoleEvents() |