OSDN Git Service

Compute dirty regions aggressively
authorJulian_Chu <walkingice@0xlab.org>
Thu, 26 May 2011 03:29:23 +0000 (11:29 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 11 Aug 2011 02:39:20 +0000 (10:39 +0800)
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.

services/surfaceflinger/SurfaceFlinger.cpp

index f4927e2..743fd18 100644 (file)
@@ -716,7 +716,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);