diff options
author | 2019-08-21 13:52:59 -0700 | |
---|---|---|
committer | 2019-10-01 17:56:39 -0700 | |
commit | fe94a225a556265e93b1ebfe520d3637fe7cc67d (patch) | |
tree | 0c72ea02c9b193f1144fdf9f16b117eb2573dc91 /libs/gui/ISurfaceComposerClient.cpp | |
parent | 3809d1d616f95442aad5a45628d72a0726b534ec (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 'libs/gui/ISurfaceComposerClient.cpp')
-rw-r--r-- | libs/gui/ISurfaceComposerClient.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp index 129558bd15..b98e48b52a 100644 --- a/libs/gui/ISurfaceComposerClient.cpp +++ b/libs/gui/ISurfaceComposerClient.cpp @@ -34,7 +34,8 @@ enum class Tag : uint32_t { CREATE_WITH_SURFACE_PARENT, CLEAR_LAYER_FRAME_STATS, GET_LAYER_FRAME_STATS, - LAST = GET_LAYER_FRAME_STATS, + MIRROR_SURFACE, + LAST = MIRROR_SURFACE, }; } // Anonymous namespace @@ -80,6 +81,12 @@ public: &ISurfaceComposerClient::getLayerFrameStats)>(Tag::GET_LAYER_FRAME_STATS, handle, outStats); } + + status_t mirrorSurface(const sp<IBinder>& mirrorFromHandle, sp<IBinder>* outHandle) override { + return callRemote<decltype(&ISurfaceComposerClient::mirrorSurface)>(Tag::MIRROR_SURFACE, + mirrorFromHandle, + outHandle); + } }; // Out-of-line virtual method definition to trigger vtable emission in this @@ -105,6 +112,8 @@ status_t BnSurfaceComposerClient::onTransact(uint32_t code, const Parcel& data, return callLocal(data, reply, &ISurfaceComposerClient::clearLayerFrameStats); case Tag::GET_LAYER_FRAME_STATS: return callLocal(data, reply, &ISurfaceComposerClient::getLayerFrameStats); + case Tag::MIRROR_SURFACE: + return callLocal(data, reply, &ISurfaceComposerClient::mirrorSurface); } } |