diff options
author | 2020-09-01 14:18:49 +0000 | |
---|---|---|
committer | 2020-09-25 12:33:30 +0000 | |
commit | 2ec1f7b970563ffd1651c36c52e9fc6831120915 (patch) | |
tree | a2ed119ce2c28fcb34fba7a815ce6cde33ad1079 /libs/gui/SurfaceComposerClient.cpp | |
parent | 7eb7ee7e16879e07c135bc89fee7a810064492af (diff) |
Provide layer id on surface creation
Allows for the layer state to be dumped on the client side with the layer's id so that they can then be associated with the respective layer dumped on the server side
Test: Check that the layer ID is provided on the client side when createSurface is called
Change-Id: I7ea851942c43fc48326bb8558a605ba6877600da
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 9b6272de43..3fda059497 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -1655,8 +1655,10 @@ sp<SurfaceControl> SurfaceComposerClient::createWithSurfaceParent(const String8& sp<IGraphicBufferProducer> gbp; uint32_t transformHint = 0; + int32_t id = -1; err = mClient->createWithSurfaceParent(name, w, h, format, flags, parentGbp, - std::move(metadata), &handle, &gbp, &transformHint); + std::move(metadata), &handle, &gbp, &id, + &transformHint); if (outTransformHint) { *outTransformHint = transformHint; } @@ -1686,8 +1688,10 @@ status_t SurfaceComposerClient::createSurfaceChecked(const String8& name, uint32 } uint32_t transformHint = 0; + int32_t id = -1; err = mClient->createSurface(name, w, h, format, flags, parentHandle, std::move(metadata), - &handle, &gbp, &transformHint); + &handle, &gbp, &id, &transformHint); + if (outTransformHint) { *outTransformHint = transformHint; } @@ -1706,7 +1710,8 @@ sp<SurfaceControl> SurfaceComposerClient::mirrorSurface(SurfaceControl* mirrorFr sp<IBinder> handle; sp<IBinder> mirrorFromHandle = mirrorFromSurface->getHandle(); - status_t err = mClient->mirrorSurface(mirrorFromHandle, &handle); + int32_t layer_id = -1; + status_t err = mClient->mirrorSurface(mirrorFromHandle, &handle, &layer_id); if (err == NO_ERROR) { return new SurfaceControl(this, handle, nullptr, true /* owned */); } |