summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Client.cpp
diff options
context:
space:
mode:
author chaviw <chaviw@google.com> 2019-08-21 13:52:59 -0700
committer chaviw <chaviw@google.com> 2019-10-01 17:56:39 -0700
commitfe94a225a556265e93b1ebfe520d3637fe7cc67d (patch)
tree0c72ea02c9b193f1144fdf9f16b117eb2573dc91 /services/surfaceflinger/Client.cpp
parent3809d1d616f95442aad5a45628d72a0726b534ec (diff)
[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
Diffstat (limited to 'services/surfaceflinger/Client.cpp')
-rw-r--r--services/surfaceflinger/Client.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp
index 6bfd302b5c..c7ed9b0412 100644
--- a/services/surfaceflinger/Client.cpp
+++ b/services/surfaceflinger/Client.cpp
@@ -106,6 +106,10 @@ status_t Client::createWithSurfaceParent(const String8& name, uint32_t w, uint32
nullptr, layer);
}
+status_t Client::mirrorSurface(const sp<IBinder>& mirrorFromHandle, sp<IBinder>* outHandle) {
+ return mFlinger->mirrorLayer(this, mirrorFromHandle, outHandle);
+}
+
status_t Client::clearLayerFrameStats(const sp<IBinder>& handle) const {
sp<Layer> layer = getLayerUser(handle);
if (layer == nullptr) {