calculate wether we filter on a per-display basis

Change-Id: I79d80b432b20b3d02428da19add464ac1e2b9378
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index 62cc92a..330e09d 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -397,6 +397,10 @@
         // Apply the logical translation, scale to physical size, apply the
         // physical translation and finally rotate to the physical orientation.
         mGlobalTransform = R * TP * S * TL;
+
+        const uint8_t type = mGlobalTransform.getType();
+        mNeedsFiltering = (!mGlobalTransform.preserveRects() ||
+                (type >= Transform::SCALE));
     }
 }