summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Client.cpp
diff options
context:
space:
mode:
author Pablo Gamito <pablogamito@google.com> 2020-09-01 14:18:49 +0000
committer Pablo Gamito <pablogamito@google.com> 2020-09-25 12:33:30 +0000
commit2ec1f7b970563ffd1651c36c52e9fc6831120915 (patch)
treea2ed119ce2c28fcb34fba7a815ce6cde33ad1079 /services/surfaceflinger/Client.cpp
parent7eb7ee7e16879e07c135bc89fee7a810064492af (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 'services/surfaceflinger/Client.cpp')
-rw-r--r--services/surfaceflinger/Client.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp
index 78bbcba4b4..07817b5a7f 100644
--- a/services/surfaceflinger/Client.cpp
+++ b/services/surfaceflinger/Client.cpp
@@ -79,17 +79,18 @@ sp<Layer> Client::getLayerUser(const sp<IBinder>& handle) const
status_t Client::createSurface(const String8& name, uint32_t w, uint32_t h, PixelFormat format,
uint32_t flags, const sp<IBinder>& parentHandle,
LayerMetadata metadata, sp<IBinder>* handle,
- sp<IGraphicBufferProducer>* gbp, uint32_t* outTransformHint) {
+ sp<IGraphicBufferProducer>* gbp, int32_t* outId,
+ uint32_t* outTransformHint) {
// We rely on createLayer to check permissions.
return mFlinger->createLayer(name, this, w, h, format, flags, std::move(metadata), handle, gbp,
- parentHandle, nullptr, outTransformHint);
+ parentHandle, nullptr, outId, outTransformHint);
}
status_t Client::createWithSurfaceParent(const String8& name, uint32_t w, uint32_t h,
PixelFormat format, uint32_t flags,
const sp<IGraphicBufferProducer>& parent,
LayerMetadata metadata, sp<IBinder>* handle,
- sp<IGraphicBufferProducer>* gbp,
+ sp<IGraphicBufferProducer>* gbp, int32_t* outId,
uint32_t* outTransformHint) {
if (mFlinger->authenticateSurfaceTexture(parent) == false) {
ALOGE("failed to authenticate surface texture");
@@ -103,11 +104,12 @@ status_t Client::createWithSurfaceParent(const String8& name, uint32_t w, uint32
}
return mFlinger->createLayer(name, this, w, h, format, flags, std::move(metadata), handle, gbp,
- nullptr, layer, outTransformHint);
+ nullptr, layer, outId, outTransformHint);
}
-status_t Client::mirrorSurface(const sp<IBinder>& mirrorFromHandle, sp<IBinder>* outHandle) {
- return mFlinger->mirrorLayer(this, mirrorFromHandle, outHandle);
+status_t Client::mirrorSurface(const sp<IBinder>& mirrorFromHandle, sp<IBinder>* outHandle,
+ int32_t* outId) {
+ return mFlinger->mirrorLayer(this, mirrorFromHandle, outHandle, outId);
}
status_t Client::clearLayerFrameStats(const sp<IBinder>& handle) const {