summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-07-28 14:20:21 -0700
committerMathias Agopian <mathias@google.com>2009-07-28 14:20:21 -0700
commit33863dd9e1005478d20b70fad42e447ac97f5abf (patch)
tree0092bdf625c8102ee649e4ebd41319b744b1cc86 /libs/surfaceflinger/SurfaceFlinger.cpp
parent5e7d68223a1061b296871cd157b4d9e81a1777ec (diff)
parentac38dfc5435b57281c97165e4de5b5a12af98a20 (diff)
downloadframeworks_base-33863dd9e1005478d20b70fad42e447ac97f5abf.zip
frameworks_base-33863dd9e1005478d20b70fad42e447ac97f5abf.tar.gz
frameworks_base-33863dd9e1005478d20b70fad42e447ac97f5abf.tar.bz2
resolved conflicts for merge of ac38dfc5 to master
Diffstat (limited to 'libs/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--libs/surfaceflinger/SurfaceFlinger.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index 7a7574f..102899c 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -650,6 +650,7 @@ void SurfaceFlinger::handleTransactionLocked(
if (currentLayers.indexOf( layer ) < 0) {
// this layer is not visible anymore
ditchedLayers.add(layer);
+ mDirtyRegionRemovedLayer.orSelf(layer->visibleRegionScreen);
}
}
}
@@ -685,17 +686,15 @@ void SurfaceFlinger::computeVisibleRegions(
layer->validateVisibility(planeTransform);
// start with the whole surface at its current location
- const Layer::State& s = layer->drawingState();
- const Rect bounds(layer->visibleBounds());
+ const Layer::State& s(layer->drawingState());
// handle hidden surfaces by setting the visible region to empty
Region opaqueRegion;
Region visibleRegion;
Region coveredRegion;
- if (UNLIKELY((s.flags & ISurfaceComposer::eLayerHidden) || !s.alpha)) {
- visibleRegion.clear();
- } else {
+ if (LIKELY(!(s.flags & ISurfaceComposer::eLayerHidden) && s.alpha)) {
const bool translucent = layer->needsBlending();
+ const Rect bounds(layer->visibleBounds());
visibleRegion.set(bounds);
coveredRegion = visibleRegion;
@@ -742,12 +741,16 @@ void SurfaceFlinger::computeVisibleRegions(
layer->setVisibleRegion(visibleRegion);
layer->setCoveredRegion(coveredRegion);
- // If a secure layer is partially visible, lock down the screen!
+ // If a secure layer is partially visible, lock-down the screen!
if (layer->isSecure() && !visibleRegion.isEmpty()) {
secureFrameBuffer = true;
}
}
+ // invalidate the areas where a layer was removed
+ dirtyRegion.orSelf(mDirtyRegionRemovedLayer);
+ mDirtyRegionRemovedLayer.clear();
+
mSecureFrameBuffer = secureFrameBuffer;
opaqueRegion = aboveOpaqueLayers;
}