SF: Allow display layer clip bounds to be overriden

Add a new virtual call to get the display bounds (in layer space) when
used as the root clip rectangle for all layers, so that it can be
customized where needed.

The base functionality is not changed -- the display viewport is still
used as the clip rectangle.

Test: Builds
Bug: 154780821
Change-Id: I5a8c564cacd87e37d11128ab4742d9f2ee897bf2
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 5a8153e..6e1d865 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -644,6 +644,13 @@
             REQUIRES(mStateLock);
     virtual void commitTransactionLocked();
 
+    // Used internally by computeLayerBounds() to gets the clip rectangle to use for the
+    // root layers on a particular display in layer-coordinate space. The
+    // layers (and effectively their children) will be clipped against this
+    // rectangle. The base behavior is to clip to the visible region of the
+    // display.
+    virtual FloatRect getLayerClipBoundsForDisplay(const DisplayDevice&) const;
+
 private:
     /* ------------------------------------------------------------------------
      * Layer management