summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-09-01 18:57:57 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-01 18:57:57 -0700
commita55c369e73a8864cc34290625acd16c68956c58a (patch)
tree9fc3f708658af2d2e3171aef18be5be4dcd6a620 /services
parent17b0317e8d006731da722a849ab2a8deb17494f6 (diff)
parentff57415bdb4590478f294f7b45805f80d2aac441 (diff)
downloadframeworks_base-a55c369e73a8864cc34290625acd16c68956c58a.zip
frameworks_base-a55c369e73a8864cc34290625acd16c68956c58a.tar.gz
frameworks_base-a55c369e73a8864cc34290625acd16c68956c58a.tar.bz2
Merge "Fix various flickering / artifacts"
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 598220f..b4c5dec 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -817,6 +817,20 @@ void SurfaceFlinger::handleWorkList()
mHwWorkListDirty = false;
HWComposer& hwc(graphicPlane(0).displayHardware().getHwComposer());
if (hwc.initCheck() == NO_ERROR) {
+
+ const DisplayHardware& hw(graphicPlane(0).displayHardware());
+ uint32_t flags = hw.getFlags();
+ if ((flags & DisplayHardware::SWAP_RECTANGLE) ||
+ (flags & DisplayHardware::BUFFER_PRESERVED))
+ {
+ // we need to redraw everything (the whole screen)
+ // NOTE: we could be more subtle here and redraw only
+ // the area which will end-up in an overlay. But since this
+ // shouldn't happen often, we invalidate everything.
+ mDirtyRegion.set(hw.bounds());
+ mInvalidRegion = mDirtyRegion;
+ }
+
const Vector< sp<LayerBase> >& currentLayers(mVisibleLayersSortedByZ);
const size_t count = currentLayers.size();
hwc.createWorkList(count);