[Mirror Layers] Added mirrorSurface API to enable mirroring (3/4)

Added a new SurfaceComposer API called mirrorSurface that allows a
client to request a mirror of a particular heirarchy starting from the
passed in layer. The API will return a SurfaceControl that's the parent
of the mirrored layer that can be updated by the client.

Test: MirrorLayerTest
Bug: 131622422
Change-Id: Ia6047f0334eabfc59d6222b2edfd4e9576ba31e5
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 2ea8f78..a9a4276 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -623,6 +623,9 @@
                                   uint32_t h, uint32_t flags, LayerMetadata metadata,
                                   sp<IBinder>* outHandle, sp<Layer>* outLayer);
 
+    status_t mirrorLayer(const sp<Client>& client, const sp<IBinder>& mirrorFromHandle,
+                         sp<IBinder>* outHandle);
+
     String8 getUniqueLayerName(const String8& name);
 
     // called when all clients have released all their references to