summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-06-28 02:54:16 -0700
committerMathias Agopian <mathias@google.com>2009-06-28 02:54:16 -0700
commit2f157b19199a4a81094d5c73cc668146c6071928 (patch)
treec938b0c3959e0911d16944443b9a5508d44ad245 /libs/surfaceflinger/SurfaceFlinger.cpp
parent9171749700853305f3e6abbcdbd9e02f3a71d459 (diff)
downloadframeworks_base-2f157b19199a4a81094d5c73cc668146c6071928.zip
frameworks_base-2f157b19199a4a81094d5c73cc668146c6071928.tar.gz
frameworks_base-2f157b19199a4a81094d5c73cc668146c6071928.tar.bz2
fix [1947273] the DimLayer causes the whole screen to update during transactions
Diffstat (limited to 'libs/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--libs/surfaceflinger/SurfaceFlinger.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index 0e998bf..ef4a8ea 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -771,10 +771,11 @@ void SurfaceFlinger::computeVisibleRegions(
dirty.orSelf(layer->visibleRegionScreen);
layer->contentDirty = false;
} else {
- // compute the exposed region
- // dirty = what's visible now - what's wasn't covered before
- // = what's visible now & what's was covered before
- dirty = visibleRegion.intersect(layer->coveredRegionScreen);
+ /* compute the exposed region:
+ * exposed = what's VISIBLE and NOT COVERED now
+ * but was COVERED before
+ */
+ dirty = (visibleRegion - coveredRegion) & layer->coveredRegionScreen;
}
dirty.subtractSelf(aboveOpaqueLayers);
@@ -783,7 +784,7 @@ void SurfaceFlinger::computeVisibleRegions(
// updade aboveOpaqueLayers/aboveCoveredLayers for next (lower) layer
aboveOpaqueLayers.orSelf(opaqueRegion);
- aboveCoveredLayers.orSelf(bounds);
+ aboveCoveredLayers.orSelf(visibleRegion);
// Store the visible region is screen space
layer->setVisibleRegion(visibleRegion);