From e6f885a7106e251e8a4e78629a6667a9d08fd529 Mon Sep 17 00:00:00 2001 From: Julian_Chu Date: Tue, 24 May 2011 23:44:12 +0800 Subject: [PATCH] Compute dirty region aggressively the exposed region consists of two components: 1) what's VISIBLE now and was COVERED before 2) what's EXPOSED now less what was EXPOSED before However, the first component should be regards as dirty region in above layer. For efficiency, we compute dirty region aggressively. --- services/surfaceflinger/SurfaceFlinger.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 5c75afa..5e50922 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -684,7 +684,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); -- 1.7.4.4