From f77395704eef9ac071168e46aa3319ac7ecb3204 Mon Sep 17 00:00:00 2001 From: Julian Chu Date: Thu, 26 May 2011 11:29:23 +0800 Subject: Compute dirty regions aggressively The exposed region consists of two components: 1) What's VISIBLE now and was COVERED before 2) What's EXPOSED now less that was EXPOSED before However, the first component should be regarded as dirty region in above layer. For efficiency reason we compute dirty region aggressively. Signed-off-by: Jim Huang --- services/surfaceflinger/SurfaceFlinger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 4876946f2b3d..23c8409f3b2c 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -681,7 +681,7 @@ void SurfaceFlinger::computeVisibleRegions( const Region oldVisibleRegion = layer->visibleRegionScreen; const Region oldCoveredRegion = layer->coveredRegionScreen; const Region oldExposed = oldVisibleRegion - oldCoveredRegion; - dirty = (visibleRegion&oldCoveredRegion) | (newExposed-oldExposed); + dirty = (newExposed-oldExposed); } dirty.subtractSelf(aboveOpaqueLayers); -- cgit v1.2.3