diff options
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 540dbd9238..c2be6eb751 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -610,13 +610,19 @@ sp<SurfaceControl> SurfaceComposerClient::createSurface( uint32_t w, uint32_t h, PixelFormat format, - uint32_t flags) + uint32_t flags, + SurfaceControl* parent) { sp<SurfaceControl> sur; if (mStatus == NO_ERROR) { sp<IBinder> handle; + sp<IBinder> parentHandle; sp<IGraphicBufferProducer> gbp; - status_t err = mClient->createSurface(name, w, h, format, flags, + + if (parent != nullptr) { + parentHandle = parent->getHandle(); + } + status_t err = mClient->createSurface(name, w, h, format, flags, parentHandle, &handle, &gbp); ALOGE_IF(err, "SurfaceComposerClient::createSurface error %s", strerror(-err)); if (err == NO_ERROR) { |