latch transparent region hint only when we get a new frame

since the transparent region hint really depends on the
content of the window containing the SurfaceView
(it's calculated by the view hierarchy based on
overlapping views), it makes sense to latch it only when
the content of the window (the app) changes.

This should help fixing drawing artifacts when changing the
layout of a window containing a SurfaceView.

Bug: 8511430
Change-Id: Ic3aa668495293cb4d82a2cd7dcf3b6a337287678
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 6bca941..2765db1 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -103,7 +103,11 @@
         uint8_t reserved[2];
         int32_t sequence; // changes when visible regions can change
         Transform transform;
-        Region transparentRegion;
+        // the transparentRegion hint is a bit special, it's latched only
+        // when we receive a buffer -- this is because it's "content"
+        // dependent.
+        Region activeTransparentRegion;
+        Region requestedTransparentRegion;
     };
 
     class LayerMesh {